<!DOCTYPE html>
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, minimum-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1"><meta http-equiv="Cache-Control" content="no-siteapp"><meta http-equiv="Cache-Control" content="no-transform"><meta name="applicable-device" content="pc,mobile"><meta name="MobileOptimized" content="width"><meta name="HandheldFriendly" content="true"><meta name="theme-color" content="#ec7259"><meta name="renderer" content="webkit"><meta name="force-rendering" content="webkit"><meta name="google" value="notranslate"><meta property="wb:webmaster" content="294ec9de89e7fadb"><meta property="qc:admins" content="104102651453316562112116375"><meta property="qc:admins" content="11635613706305617"><meta property="qc:admins" content="1163561616621163056375"><meta name="360-site-verification" content="604a14b53c6b871206001285921e81d8"><meta name="google-site-verification" content="cV4-qkUJZR6gmFeajx_UyPe47GW9vY6cnCrYtCHYNh4"><meta name="google-site-verification" content="HF7lfF8YEGs1qtCE-kPml8Z469e2RHhGajy6JPVy5XI"><meta name="tencent-site-verification" content="da26ce22cfed7aba6a96d8409f9b53a6"><meta name="apple-mobile-web-app-title" content="简书"><link href="" rel="shortcut icon" type="image/x-icon"><link rel="dns-prefetch" href="https://cdn2.jianshu.io/"><link rel="dns-prefetch" href="https://upload-images.jianshu.io/"><meta http-equiv="mobile-agent" content="format=html5; url=https://www.jianshu.com/p/33da835ba0f2"><meta name="apple-itunes-app" content="app-id=888237539, app-argument=jianshu://notes/4604939"><meta property="al:ios:url" content="jianshu://notes/4604939"><meta property="al:ios:app_store_id" content="888237539"><meta property="al:ios:app_name" content="简书"><meta property="al:android:url" content="jianshu://notes/4604939"><meta property="al:android:package" content="com.jianshu.haruki"><meta property="al:android:app_name" content="简书"><title>gsoap使用笔记 - 简书</title><meta name="robots" content="index,follow"><meta name="googlebot" content="index,follow"><meta name="description" content="gsoap入门 1 使用gsoap搭建web service 参考了参考文档[2]中的介绍，有一点点修改。 1.1 编译calc客户端 根据wsdl文件生成gsoap用的头文..."><meta name="twitter:card" content="summary"><meta name="twitter:site" content="@jianshu.com"><meta property="fb:app_id" content="865829053512461"><meta property="og:url" content="https://www.jianshu.com/p/33da835ba0f2"><meta property="og:type" content="article"><meta property="og:title" content="gsoap使用笔记"><meta property="og:description" content="gsoap入门 1 使用gsoap搭建web service 参考了参考文档[2]中的介绍，有一点点修改。 1.1 编译calc客户端 根据wsdl文件生成gsoap用的头文..."><meta property="og:image" content="https://cdn2.jianshu.io/assets/default_avatar/2-9636b13945b9ccf345bc98d0d81074eb.jpg"><meta property="og:site_name" content="简书"><script type="text/javascript" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/z_stat.php"></script><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, minimum-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1"><meta http-equiv="Cache-Control" content="no-siteapp"><meta http-equiv="Cache-Control" content="no-transform"><meta name="next-head-count" content="46"><link rel="preload" href="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/slug.js" as="script"><link rel="preload" href="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/_app.js" as="script"><link rel="preload" href="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/webpack-b970243236ece2cb2fcf.js" as="script"><link rel="preload" href="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/commons.js" as="script"><link rel="preload" href="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/styles.js" as="script"><link rel="preload" href="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/main-aaafd02c978b8de8e326.js" as="script"><link rel="preload" href="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/commons.css" as="style"><link rel="stylesheet" href="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/commons.css"><link rel="preload" href="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/styles.css" as="style"><link rel="stylesheet" href="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/styles.css"><link rel="stylesheet" type="text/css" href="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/12.css"><script charset="utf-8" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/12.js"></script><link rel="stylesheet" type="text/css" href="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/13.css"><script charset="utf-8" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/13.js"></script><link rel="stylesheet" type="text/css" href="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/10.css"><script charset="utf-8" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/10.js"></script></head><body class=""><svg class="wCYvWN" style="display:none;width:0;height:0" width="0" height="0" focusable="false" aria-hidden="true"><symbol id="ic-icon_requests" viewBox="0 0 1024 1024"><path d="M934.4 627.2A38.4 38.4 0 0 1 972.8 665.6v128a140.8 140.8 0 0 1-140.8 140.8H192A140.8 140.8 0 0 1 51.2 793.6V665.6a38.4 38.4 0 1 1 76.8 0v128c0 35.328 28.672 64 64 64h640c35.328 0 64-28.672 64-64V665.6a38.4 38.4 0 0 1 38.4-38.4zM587.4688 91.392l281.8048 244.224a64 64 0 0 1-41.8816 112.384h-148.992V665.6a89.6 89.6 0 0 1-89.6 89.6h-153.6A89.6 89.6 0 0 1 345.6 665.6V448H196.608a64 64 0 0 1-41.8816-112.384l281.8048-244.224a115.2 115.2 0 0 1 150.9376 0zM486.8608 149.4016L230.912 371.2H384a38.4 38.4 0 0 1 38.4 38.4v256c0 7.0656 5.7344 12.8 12.8 12.8h153.6a12.8 12.8 0 0 0 12.8-12.8V409.6a38.4 38.4 0 0 1 38.4-38.4h153.088L537.088 149.4016a38.4 38.4 0 0 0-50.2784 0z"></path></symbol><symbol id="ic-icon_others" viewBox="0 0 1024 1024"><path d="M512 435.2a76.8 76.8 0 1 1 0 153.6 76.8 76.8 0 0 1 0-153.6z m-307.2 0a76.8 76.8 0 1 1 0 153.6 76.8 76.8 0 0 1 0-153.6z m614.4 0a76.8 76.8 0 1 1 0 153.6 76.8 76.8 0 0 1 0-153.6z"></path></symbol><symbol id="ic-icon_money" viewBox="0 0 1024 1024"><path d="M512 51.2a460.8 460.8 0 1 1 0 921.6 460.8 460.8 0 0 1 0-921.6z m0 76.8a384 384 0 1 0 0 768 384 384 0 0 0 0-768zM435.0976 311.3984L510.1568 450.56l75.264-139.52a37.7344 37.7344 0 0 1 49.664-16.0256 33.9456 33.9456 0 0 1 14.7968 47.104l-76.288 135.7824h102.4a29.0304 29.0304 0 1 1 0 58.0608h-127.0272v55.0912h126.976a29.0304 29.0304 0 1 1 0 58.0608h-126.976v49.152a38.8096 38.8096 0 1 1-77.6192 0v-49.152H345.2416a29.0304 29.0304 0 1 1 0-58.0608h126.1056v-55.0912H345.2416a29.0304 29.0304 0 0 1 0-58.0608h101.4272L369.0496 342.784a34.304 34.304 0 0 1 15.0016-48.0768 38.9632 38.9632 0 0 1 51.0464 16.6912z"></path></symbol><symbol id="ic-icon_follows" viewBox="0 0 1024 1024"><path d="M844.8 614.4a38.4 38.4 0 0 1 38.4 38.4v102.4h102.4a38.4 38.4 0 1 1 0 76.8h-102.4512l0.0512 102.4a38.4 38.4 0 1 1-76.8 0l-0.0512-102.4H704a38.4 38.4 0 1 1 0-76.8h102.4v-102.4a38.4 38.4 0 0 1 38.4-38.4z m-370.176-89.6c80.5888 0 158.3104 16.896 227.4816 48.64a38.4 38.4 0 1 1-32.0512 69.7856 468.2752 468.2752 0 0 0-195.3792-41.6256c-175.616 0-327.7312 93.184-378.112 223.9488-13.4144 38.5536-4.7616 57.5488 7.8336 57.5488H665.6a38.4 38.4 0 1 1 0 76.8H104.448c-74.24 0-109.1584-76.8-80.0256-160.768 62.8736-163.1232 244.3264-274.3296 450.2528-274.3296zM460.8 12.8a243.2 243.2 0 1 1 0 486.4 243.2 243.2 0 0 1 0-486.4z m0 76.8a166.4 166.4 0 1 0 0 332.8 166.4 166.4 0 0 0 0-332.8z"></path></symbol><symbol id="ic-icon_comments" viewBox="0 0 1024 1024"><path d="M537.6 51.2a435.2 435.2 0 1 1 0 870.4h-51.2a433.2544 433.2544 0 0 1-209.2544-53.504l-126.976 94.8224a51.2 51.2 0 0 1-81.8688-41.0624v-314.2144A435.2 435.2 0 0 1 486.4 51.2h51.2z m0 76.8h-51.2a358.4 358.4 0 0 0-344.32 458.24c2.048 6.9632 3.072 14.1824 3.072 21.4016v263.168l86.016-64.256a76.8 76.8 0 0 1 82.944-5.7856c52.3264 28.7744 111.104 44.032 172.288 44.032h51.2a358.4 358.4 0 0 0 0-716.8z m89.6 435.2a38.4 38.4 0 1 1 0 76.8h-230.4a38.4 38.4 0 1 1 0-76.8h230.4z m0-204.8a38.4 38.4 0 1 1 0 76.8h-230.4a38.4 38.4 0 0 1 0-76.8h230.4z"></path></symbol><symbol id="ic-icon_chat" viewBox="0 0 1024 1024"><path d="M870.4 153.6a102.4 102.4 0 0 1 102.4 102.4v512a102.4 102.4 0 0 1-102.4 102.4H153.6a102.4 102.4 0 0 1-102.4-102.4V256a102.4 102.4 0 0 1 102.4-102.4h716.8z m0 76.8H153.6a25.6 25.6 0 0 0-25.6 25.6v512a25.6 25.6 0 0 0 25.6 25.6h716.8a25.6 25.6 0 0 0 25.6-25.6V256a25.6 25.6 0 0 0-25.6-25.6z m-113.7664 97.3312a38.4 38.4 0 0 1 47.1552 60.5696l-274.5856 213.9136a38.4 38.4 0 0 1-47.2064 0L208.384 389.12a38.4 38.4 0 1 1 47.2064-60.6208l250.0096 194.7648z"></path></symbol><symbol id="ic-icon_collection" viewBox="0 0 1024 1024"><path d="M819.2 51.2a102.4 102.4 0 0 1 102.4 102.4v707.6864a76.8 76.8 0 0 1-104.192 71.7824L512 816.4864l-305.408 116.5824A76.8 76.8 0 0 1 102.4 861.2864V153.6a102.4 102.4 0 0 1 102.4-102.4h614.4z m0 76.8H204.8a25.6 25.6 0 0 0-25.6 25.6v707.6864l305.408-116.5312a76.8 76.8 0 0 1 54.784 0l305.408 116.5312V153.6a25.6 25.6 0 0 0-25.6-25.6z m-293.6832 105.984a25.6 25.6 0 0 1 8.192 8.192l63.744 102.2464 116.9408 28.9792a25.6 25.6 0 0 1 13.4144 41.3184L650.24 506.9312l8.5504 120.1664a25.6 25.6 0 0 1-35.1232 25.5488L512 607.3856l-111.616 45.2608a25.6 25.6 0 0 1-35.1744-25.5488L373.76 506.9312l-77.568-92.16a25.6 25.6 0 0 1 13.4144-41.3696l116.9408-28.9792L490.2912 242.176a25.6 25.6 0 0 1 35.2256-8.192zM512 352.512l-20.2752 32.512a76.8 76.8 0 0 1-46.6944 33.9456l-37.1712 9.216 24.6784 29.2864a76.8 76.8 0 0 1 17.8176 54.9376l-2.7136 38.1952 35.4816-14.3872a76.8 76.8 0 0 1 57.7536 0l35.4816 14.336-2.7136-38.144a76.8 76.8 0 0 1 17.8176-54.9376l24.6784-29.2864-37.1712-9.216a76.8 76.8 0 0 1-46.6944-33.9456L512 352.512z"></path></symbol><symbol id="ic-icon_help" viewBox="0 0 1024 1024"><path d="M512 51.2a460.8 460.8 0 1 1 0 921.6 460.8 460.8 0 0 1 0-921.6z m0 76.8a384 384 0 1 0 0 768 384 384 0 0 0 0-768zM512 716.8a51.2 51.2 0 1 1 0 102.4 51.2 51.2 0 0 1 0-102.4z m0-481.8944a166.4 166.4 0 0 1 166.4 166.4c0 46.848-26.7264 78.336-79.8208 116.992l-23.552 16.7936a299.008 299.008 0 0 0-18.0736 13.7216c-4.9664 4.1984-6.4 5.9392-6.5536 2.2528v89.088a38.4 38.4 0 1 1-76.8 0V547.84c0.512-23.1936 12.7488-39.936 33.9456-57.7536 6.2464-5.2736 13.1584-10.496 22.7328-17.408 1.2288-0.8704 18.2272-12.9024 23.1424-16.4864 33.9968-24.7296 48.1792-41.472 48.1792-54.8864a89.6 89.6 0 0 0-179.2 0 38.4 38.4 0 0 1-76.8 0A166.4 166.4 0 0 1 512 234.9056z"></path></symbol><symbol id="ic-icon_like" viewBox="0 0 1024 1024"><path d="M921.344 180.5312a269.3632 269.3632 0 0 1 0 377.2928l-372.8896 378.0096a51.2 51.2 0 0 1-72.9088 0l-372.8896-378.0096a269.3632 269.3632 0 0 1 0-377.2928 260.608 260.608 0 0 1 372.1216 0l37.2224 37.7344 37.2224-37.7344a260.608 260.608 0 0 1 372.1216 0zM157.3376 234.496a192.5632 192.5632 0 0 0 0 269.4144L512 863.4368l354.6624-359.5776a192.5632 192.5632 0 0 0 0-269.4144 183.808 183.808 0 0 0-262.7584 0L515.4304 324.096 400.128 443.5968a38.4 38.4 0 0 1-55.2448-53.3504L458.0864 272.896l-37.9904-38.5024a183.808 183.808 0 0 0-262.7584 0z"></path></symbol><symbol id="ic-icon_purchased" viewBox="0 0 1024 1024"><path d="M819.2 51.2a102.4 102.4 0 0 1 102.4 102.4v716.8a102.4 102.4 0 0 1-102.4 102.4H204.8a102.4 102.4 0 0 1-102.4-102.4V153.6a102.4 102.4 0 0 1 102.4-102.4h614.4z m0 76.8H204.8a25.6 25.6 0 0 0-25.6 25.6v716.8a25.6 25.6 0 0 0 25.6 25.6h614.4a25.6 25.6 0 0 0 25.6-25.6V153.6a25.6 25.6 0 0 0-25.6-25.6z m-67.1744 341.0944a38.4 38.4 0 0 1 10.3424 53.3504l-186.112 275.8656a38.4 38.4 0 0 1-53.2992 10.3936l-148.5824-100.1984a38.4 38.4 0 1 1 43.008-63.6928l116.736 78.7456 164.5568-244.0704a38.4 38.4 0 0 1 53.3504-10.3936zM473.6 435.2a38.4 38.4 0 0 1 0 76.8h-179.2a38.4 38.4 0 0 1 0-76.8h179.2z m102.4-179.2a38.4 38.4 0 1 1 0 76.8h-281.6a38.4 38.4 0 0 1 0-76.8h281.6z"></path></symbol><symbol id="ic-icon_logout" viewBox="0 0 1024 1024"><path d="M832 64c70.8096 0 128 58.0608 128 129.4336v45.5168a38.4 38.4 0 1 1-76.8 0v-45.568c0-29.184-23.04-52.5824-51.2-52.5824H243.2c-28.16 0-51.2 23.4496-51.2 52.6336v637.1328c0 29.184 23.04 52.6336 51.2 52.6336h588.8c28.16 0 51.2-23.4496 51.2-52.6336v-45.5168a38.4 38.4 0 0 1 76.8 0v45.568c0 71.3216-57.1904 129.3824-128 129.3824H243.2c-70.8096 0-128-58.0608-128-129.4336V193.4336c0-71.3728 57.1904-129.4336 128-129.4336z m-52.6336 248.064l160.8192 160.8192a38.4 38.4 0 0 1 2.1504 56.32l-162.9184 162.9184a38.4 38.4 0 0 1-54.272-54.272l97.3312-97.3824h-413.696c-13.9264 0-25.4464-14.2336-27.392-32.768l-0.3072-5.632c0-19.3024 10.24-35.2768 23.552-37.9904l4.096-0.4608 413.6448 0.0512-97.28-97.28a38.4 38.4 0 0 1 54.272-54.3232z"></path></symbol><symbol id="ic-icon_wallet" viewBox="0 0 1024 1024"><path d="M870.4 128a102.4 102.4 0 0 1 102.4 102.4v563.2a102.4 102.4 0 0 1-102.4 102.4H153.6a102.4 102.4 0 0 1-102.4-102.4v-563.2a102.4 102.4 0 0 1 102.4-102.4h716.8zM870.4 204.8H153.6a25.6 25.6 0 0 0-25.6 25.6V307.2H358.4a204.8 204.8 0 1 1 0 409.6H128v76.8a25.6 25.6 0 0 0 25.6 25.6h716.8a25.6 25.6 0 0 0 25.6-25.6v-563.2A25.6 25.6 0 0 0 870.4 204.8zM358.4 384H128v256H358.4a128 128 0 1 0 0-256z m-25.6 51.2a76.8 76.8 0 1 1 0 153.6 76.8 76.8 0 0 1 0-153.6z"></path></symbol><symbol id="ic-icon_mine" viewBox="0 0 1024 1024"><path d="M512.3072 549.4272h6.5024-7.168a588.0832 588.0832 0 0 1 28.16 0.6144l6.3488 0.4096c3.6352 0.1536 7.2704 0.4096 10.9056 0.6656l4.864 0.512c62.8736 5.2224 123.2384 20.6336 178.176 45.1584 1.536 0.7168 3.072 1.536 4.608 2.4064l1.8944 0.8704c100.352 46.6432 178.8416 122.6752 215.9616 216.32 29.184 81.664-5.8368 156.416-80.128 156.416l-178.176-0.0512-0.768 0.0512H141.568C67.328 972.8 32.256 898.048 61.44 816.384c37.12-93.6448 115.5584-169.6768 215.9616-216.32l1.9456-0.8704a39.168 39.168 0 0 1 4.608-2.4064c54.8864-24.576 115.2512-39.936 178.1248-45.2608l4.864-0.3584c3.584-0.3072 7.2704-0.5632 10.9056-0.768l6.3488-0.3072a671.5904 671.5904 0 0 1 28.1088-0.6656h-7.1168 6.5024z m370.176 348.672c12.5952 0 21.248-18.4832 7.8336-56.0128-47.0528-118.6304-182.7328-205.568-343.4496-216.7296a229.9392 229.9392 0 0 0-7.9872-0.512l7.9872 0.512a507.6992 507.6992 0 0 0-69.7344 0l7.9872-0.512c-164.1984 8.8576-303.616 96.6144-351.4368 217.2416-13.4144 37.5296-4.7616 55.9616 7.8848 55.9616h740.864zM498.3808 51.2c134.5024 0 243.5584 105.984 243.5584 236.6464 0 130.7136-109.056 236.6464-243.5584 236.6464S254.8736 418.56 254.8736 287.8464 363.9296 51.2 498.432 51.2z m0 74.752c-92.0064 0-166.656 72.4992-166.656 161.8944 0 89.4464 74.6496 161.9456 166.656 161.9456s166.6048-72.4992 166.6048-161.9456c0-89.3952-74.5984-161.8944-166.6048-161.8944z"></path></symbol><symbol id="ic-icon_setting" viewBox="0 0 1024 1024"><path d="M708.864 68.608a102.4 102.4 0 0 1 88.6784 51.2L994.4576 460.8a102.4 102.4 0 0 1 0 102.4l-196.9152 340.992a102.4 102.4 0 0 1-88.6784 51.2h-393.728a102.4 102.4 0 0 1-88.6784-51.2L29.5424 563.2a102.4 102.4 0 0 1 0-102.4l196.9152-340.992a102.4 102.4 0 0 1 88.6784-51.2h393.728z m0 76.8h-393.728a25.6 25.6 0 0 0-22.1696 12.8L96.0512 499.2a25.6 25.6 0 0 0 0 25.6l196.9152 340.992a25.6 25.6 0 0 0 22.1696 12.8h393.728a25.6 25.6 0 0 0 22.1696-12.8l196.9152-340.992a25.6 25.6 0 0 0 0-25.6l-196.9152-340.992a25.6 25.6 0 0 0-22.1696-12.8zM512 345.6a166.4 166.4 0 1 1 0 332.8 166.4 166.4 0 0 1 0-332.8z m0 76.8a89.6 89.6 0 1 0 0 179.2 89.6 89.6 0 0 0 0-179.2z"></path></symbol><symbol id="ic-spinner" viewBox="0 0 1024 1024"><path d="M300.571429 817.90476233q0 30.285714-21.428572 51.714285T227.428571 891.04761933q-29.714286 0-51.428571-21.714286t-21.714286-51.428571q0-30.285714 21.428572-51.714286T227.428571 744.76190433t51.714286 21.428572T300.571429 817.90476233z m284.571428 117.714285q0 30.285714-21.428571 51.714286T512 1008.76190433t-51.714286-21.428571T438.857143 935.61904733t21.428571-51.714285T512 862.47619033t51.714286 21.428572 21.428571 51.714285zM182.857143 533.33333333q0 30.285714-21.428572 51.714286T109.714286 606.47619033t-51.714286-21.428571T36.571429 533.33333333t21.428571-51.714286T109.714286 460.19047633t51.714285 21.428571T182.857143 533.33333333z m686.857143 284.571429q0 29.714286-21.714286 51.428571t-51.428571 21.714286q-30.285714 0-51.714286-21.428572T723.428571 817.90476233t21.428572-51.714286 51.714286-21.428572 51.714285 21.428572 21.428572 51.714286zM318.857143 248.76190433q0 37.714286-26.857143 64.571429t-64.571429 26.857143-64.571428-26.857143-26.857143-64.571429 26.857143-64.571428 64.571428-26.857143 64.571429 26.857143 26.857143 64.571428z m668.571428 284.571429q0 30.285714-21.428571 51.714286T914.285714 606.47619033t-51.714285-21.428571T841.142857 533.33333333t21.428572-51.714286T914.285714 460.19047633t51.714286 21.428571T987.428571 533.33333333z m-365.714285-402.285714q0 45.714286-32 77.714285t-77.714286 32-77.714286-32-32-77.714285 32-77.714286T512 21.33333333t77.714286 32 32 77.714286z m302.857143 117.714285q0 53.142857-37.714286 90.571429T796.571429 376.76190433q-53.142857 0-90.571429-37.428571T668.571429 248.76190433q0-52.571429 37.428571-90.285714t90.571429-37.714286q52.571429 0 90.285714 37.714286t37.714286 90.285714z"></path></symbol><symbol id="ic-alipay" viewBox="0 0 1024 1024"><path d="M1023.795 853.64v6.348a163.807 163.807 0 0 1-163.807 163.807h-696.18A163.807 163.807 0 0 1 0 859.988v-696.18A163.807 163.807 0 0 1 163.807 0h696.181a163.807 163.807 0 0 1 163.807 163.807V853.64z" fill="#009FE9"></path><path d="M844.836 648.267c-40.952-14.333-95.623-34.809-156.846-57.128a949.058 949.058 0 0 0 90.094-222.573H573.325V307.14h245.711v-43.41l-245.71 2.458V143.33H472.173c-18.223 0-21.704 20.476-21.704 20.476v102.38H204.759v40.952h245.71v61.427H245.712v40.952h409.518a805.522 805.522 0 0 1-64.909 148.246c-128.384-42.795-266.186-77.604-354.233-55.08a213.564 213.564 0 0 0-112.003 63.27c-95.418 116.917-26.21 294.034 175.274 294.034 119.989 0 236.087-67.366 325.771-177.73 134.322 65.932 398.666 176.297 398.666 176.297V701.3s-32.352-4.095-178.96-53.033z m-563.702 144.97c-158.893 0-204.759-124.699-126.336-194.112a191.86 191.86 0 0 1 90.913-46.276c93.575-10.238 189.811 35.629 293.624 86.614-74.941 94.598-166.674 153.774-258.2 153.774z" fill="#FFFFFF"></path></symbol><symbol id="ic-wechat-pay" viewBox="0 0 1076 1024"><path d="M410.493712 644.226288c-64.448471 36.97706-74.006881-20.759958-74.006881-20.759958l-80.772173-193.983933c-31.078562-92.178305 26.897497-41.56191 26.897498-41.561909s49.746372 38.732181 87.50193 62.333712c37.732946 23.602608 80.745253 6.927882 80.745254 6.927882l528.043743-250.842313C881.479874 81.578667 720.547129 0 538.352656 0 241.013636 0 0 217.098768 0 484.919453c0 154.046856 79.806318 291.154103 204.11518 380.019214L181.698086 997.56551s-10.92805 38.720336 26.945952 20.759958c25.808892-12.243853 91.603314-56.122953 130.768353-82.82771 61.570288 22.083298 128.651441 34.345455 198.970414 34.345455 297.315331 0 538.378498-217.098768 538.378499-484.924837 0-77.573115-20.313102-150.8338-56.295235-215.861568-168.236416 104.176656-559.545472 346.282128-609.973434 375.167327z" fill="#00cc22"></path></symbol><symbol id="ic-emoji" viewBox="0 0 1024 1024"><path d="M32 512C32 246.90332 246.90332 32 512 32 777.09668 32 992 246.90332 992 512 992 777.09668 777.09668 992 512 992 246.90332 992 32 777.09668 32 512ZM920 512C920 286.66782219 737.33217875 104 512 104 286.66782219 104 104 286.66782219 104 512 104 737.33217875 286.66782219 920 512 920 737.33217875 920 920 737.33217875 920 512ZM667.59732781 584C661.80988156 664.88360937 594.35802594 728.70452469 512 728.70452469 429.64197219 728.70452469 362.19011938 664.88360937 356.40267313 584 401.27447563 599.63467063 454.6818125 608.70452469 512 608.70452469 569.3181875 608.70452469 622.72552156 599.63467063 667.59732781 584L667.59732781 584ZM368 440C394.50966781 440 416 418.50966781 416 392 416 365.49033219 394.50966781 344 368 344 341.49033219 344 320 365.49033219 320 392 320 418.50966781 341.49033219 440 368 440ZM656 440C682.50966594 440 704 418.50966781 704 392 704 365.49033219 682.50966594 344 656 344 629.49033406 344 608 365.49033219 608 392 608 418.50966781 629.49033406 440 656 440Z"></path></symbol><symbol id="ic-dislike" viewBox="0 0 1137 1024"><path d="M771.413333 668.728889c-18.773333 3.015111-25.031111 20.878222-28.16 29.866667v217.884444c0 59.733333-49.948444 107.52-112.412444 107.52a115.427556 115.427556 0 0 1-112.412445-92.558222c-31.857778-190.919111-146.830222-263.850667-230.627555-290.133334a27.420444 27.420444 0 0 1-19.228445-26.168888V37.944889C268.572444 17.066667 285.582222 0 306.631111 0h567.864889c59.335111 11.946667 99.953778 32.824889 128 89.543111l128.113778 429.909333c24.974222 77.653333-15.644444 152.291556-106.211556 149.276445H771.413333z m-605.866666-32.824889H81.180444C37.546667 635.904 0 600.064 0 558.250667V80.611556C0 35.84 34.360889 0 81.180444 0H165.546667c29.297778 0 53.077333 23.779556 53.077333 53.077333v529.749334a53.077333 53.077333 0 0 1-53.077333 53.077333z"></path></symbol><symbol id="ic-close" viewBox="0 0 1024 1024"><path d="M511.99967832 371.66626953L792.60221182 91.06373692a99.19122714 99.19122714 0 0 1 140.33340878 140.33340878L652.33308711 511.99967832l280.60253349 280.6025335a99.19122714 99.19122714 0 1 1-140.33340878 140.33340878L511.99967832 652.33308711l-280.60253262 280.60253349a99.19122714 99.19122714 0 1 1-140.33340878-140.33340878L371.66626953 511.99967832 91.06373692 231.3971457A99.19122714 99.19122714 0 1 1 231.3971457 91.06373692L511.99967832 371.66626953z"></path></symbol><symbol id="ic-right" viewBox="0 0 1024 1024"><path d="M570.461091 506.693818L241.384727 177.524364A93.090909 93.090909 0 1 1 373.015273 45.893818L768 440.878545a93.090909 93.090909 0 0 1 0 131.630546l-394.984727 394.891636A93.090909 93.090909 0 0 1 241.384727 835.770182l329.076364-329.076364z"></path></symbol><symbol id="ic-more" viewBox="0 0 4096 1024"><path d="M3495.04988446 991.9952a481.91759063 481.91759063 0 0 1-483.83758031-479.9976c0-265.19867437 216.71891625-479.9976 483.83758031-479.9976S3978.64746665 246.79892562 3978.64746665 511.9976c0 264.95867531-216.47891719 479.9976-483.59758219 479.9976M2065.61703196 991.9952a481.91759063 481.91759063 0 0 1-483.35758312-479.9976c0-265.19867437 216.47891719-479.9976 483.35758312-479.9976 267.11866406 0 483.59758219 214.79892563 483.59758219 479.9976 0 264.95867531-216.47891719 479.9976-483.59758219 479.9976M622.26424884 991.9952A481.91759063 481.91759063 0 0 1 138.66666665 511.9976C138.66666665 246.79892562 355.14558384 32 622.26424884 32S1105.86183102 246.79892562 1105.86183102 511.9976c0 264.95867531-216.47891719 479.9976-483.59758218 479.9976"></path></symbol><symbol id="ic-toggle" viewBox="0 0 1024 1024"><path d="M350.366755 1023.926863a50.025855 50.025855 0 0 0 50.025855-50.025855V174.803795a73.137215 73.137215 0 0 0-124.47954-52.146834L36.096141 359.109577a50.830365 50.830365 0 0 0-0.731372 71.674471 50.537816 50.537816 0 0 0 71.601334 0.877647l193.301659-189.425388v731.737838c0 27.645867 22.453125 50.025855 50.025855 50.025855z"></path><path d="M720.953024 0.005851a47.246641 47.246641 0 0 0-47.246641 47.246641v799.389761a73.137215 73.137215 0 0 0 124.9915 51.634874l190.522446-191.619503a51.415462 51.415462 0 0 0 1.31647-71.089374 45.783897 45.783897 0 0 0-67.066827-0.292548l-155.343445 165.802066V47.252492A47.246641 47.246641 0 0 0 720.953024 0.005851z"></path></symbol><symbol id="ic-notebook" viewBox="0 0 1024 1024"><path d="M178.390055 120.591045C111.268624 120.591045 56.888889 174.401955 56.888889 240.556383V903.97778C56.888889 970.302855 111.097977 1024 178.390055 1024h545.731364c67.121431 0 121.558049-53.81091 121.558049-120.02222V240.613265c0-66.268192-54.209088-120.02222-121.558049-120.02222H178.390055z m455.117432 301.136319H269.06087a30.147761 30.147761 0 0 1 0-60.238641h364.503499a30.147761 30.147761 0 0 1 0 60.238641z m303.18409 301.136318a30.318409 30.318409 0 0 1-30.375291-30.318409V180.317742c0-66.268192-53.81091-120.02222-121.330519-120.022219H329.697688a30.147761 30.147761 0 0 1 0-60.23864l454.946784 0.056882C885.326618 0.113765 967.009987 80.887013 967.009987 180.602155v511.943118a30.318409 30.318409 0 0 1-30.31841 30.318409z m-303.18409-120.47728H269.06087a30.147761 30.147761 0 1 1 0-60.238641h364.503499a30.147761 30.147761 0 0 1 0 60.238641z"></path></symbol><symbol id="ic-check" viewBox="0 0 1433 1024"><path d="M586.88355555 719.072L1197.82755555 108.128a96 96 0 0 1 135.744 135.744L654.75555555 922.688a96 96 0 0 1-135.744 0L111.68355555 515.456A96 96 0 0 1 247.42755555 379.52l339.456 339.456z"></path></symbol><symbol id="ic-plus" viewBox="0 0 1024 1024"><path d="M437.00000029 437.00000029V136.99999971a74.99999971 74.99999971 0 1 1 149.99999942 0v300.00000058h300.00000058a74.99999971 74.99999971 0 0 1 0 149.99999942H586.99999971v300.00000058a74.99999971 74.99999971 0 0 1-149.99999942 0V586.99999971H136.99999971a74.99999971 74.99999971 0 1 1 0-149.99999942h300.00000058z"></path></symbol><symbol id="ic-pencil" viewBox="0 0 1092 1024"><path d="M597.469867 198.724267L81.92 718.574933 0 1024l309.4528-74.410667 512-521.762133-223.982933-229.102933z m400.861866-37.888L858.5216 17.885867a58.845867 58.845867 0 0 0-84.309333 0L657.2032 137.6256l223.914667 229.1712 117.1456-119.808a61.576533 61.576533 0 0 0 0-86.152533h0.068266zM546.133333 930.884267h546.133334V1024H546.133333v-93.115733z m273.066667-186.1632h273.066667v93.115733h-273.066667v-93.115733z"></path></symbol><symbol id="ic-sugar" viewBox="0 0 1024 1024"><path d="M562.362182 689.338182L352.581818 422.632727a182.737455 182.737455 0 0 1 109.056-85.876363l209.780364 266.612363a182.737455 182.737455 0 0 1-109.056 85.876364z m-28.811637 5.725091a183.296 183.296 0 0 1-193.349818-245.76l193.349818 245.76z m150.248728-118.225455l-193.349818-245.76a183.249455 183.249455 0 0 1 193.349818 245.76zM558.545455 282.065455l-40.215273-150.109091 151.738182-40.680728-13.544728-50.548363-202.333091 54.178909L503.156364 277.550545a235.659636 235.659636 0 0 0-199.493819 345.553455L120.925091 672.069818l13.544727 50.548364 200.704-53.76A236.683636 236.683636 0 0 0 465.454545 744.075636l40.215273 150.155637-151.738182 40.634182 13.544728 50.594909 202.333091-54.225455-48.965819-182.690909a235.613091 235.613091 0 0 0 199.493819-345.553455l182.690909-48.919272-13.544728-50.594909-200.704 53.76A236.683636 236.683636 0 0 0 558.545455 282.065455z m126.882909-32.256l126.464-33.885091-13.544728-50.594909-101.189818 27.136-27.089454-101.189819-50.594909 13.544728 40.680727 151.738181 25.274182-6.74909zM338.618182 776.378182l-126.464 33.885091 13.544727 50.548363 101.189818-27.089454 27.089455 101.143273 50.594909-13.498182-40.680727-151.738182-25.274182 6.749091z m-153.6-67.304727l-50.548364 13.544727 40.680727 151.738182 50.548364-13.498182-40.634182-151.738182z m653.963636-392.052364l50.548364-13.544727-40.680727-151.738182-50.548364 13.544727 40.634182 151.738182z"></path></symbol><symbol id="ic-like" viewBox="0 0 1084 1024"><path d="M728.064 343.943529c-17.648941-2.891294-23.552-20.239059-26.503529-28.912941V104.026353C701.560471 46.200471 654.396235 0 595.425882 0c-53.007059 0-97.28 40.478118-106.134588 89.569882-29.997176 184.862118-138.541176 255.457882-217.630118 280.937412a26.142118 26.142118 0 0 0-18.130823 24.877177v560.067764c0 19.817412 16.022588 35.84 35.84 35.84h535.973647c56.018824-11.565176 94.328471-31.804235 120.892235-86.738823l120.832-416.105412c23.552-75.173647-14.757647-147.395765-100.231529-144.564706h-238.772706z m-571.813647 31.744H76.619294C35.358118 375.687529 0 410.383059 0 450.861176v462.426353c0 43.369412 32.406588 78.004706 76.619294 78.004706h79.631059c27.708235 0 50.115765-22.407529 50.115765-50.115764V425.863529a50.115765 50.115765 0 0 0-50.115765-50.115764z"></path></symbol><symbol id="ic-reply" viewBox="0 0 1092 1024"><path d="M173.24799969 781.568C95.168 781.568 32 723.07200031 32 650.94399969V162.56C32 90.49599969 95.04000031 32 172.99200031 32h742.01599969C992.96 32 1056.00000031 90.49599969 1056.00000031 162.62400031v488.31999938c0 72.06400031-63.36 130.62400031-141.12 130.62400031h-343.68l-287.55200062 196.224a12.79999969 12.79999969 0 0 1-19.968-10.87999969l5.63200031-185.34400031H173.24799969z"></path></symbol><symbol id="ic-shang" viewBox="0 0 1024 1024"><path d="M827.512471 177.88486233c35.056941 0 61.982118 8.914824 79.028705 26.684236 17.950118 17.769412 26.985412 44.453647 26.985412 80.052706 0 17.769412-3.614118 43.610353-10.842353 77.402353-3.553882 17.769412-14.336 65.776941-50.236235 65.776941a48.549647 48.549647 0 0 1-35.056941-15.058824 39.273412 39.273412 0 0 1-3.614118-48.971294c9.938824-30.238118 15.299765-56.922353 15.299765-77.402353 0-26.684235-7.228235-26.684235-13.492706-26.684235H189.861647c-0.843294 0-1.807059 0-3.553882 1.807059-1.807059 1.807059-1.807059 2.650353-1.807059 4.457411v108.483765c0 17.829647-11.685647 39.152941-43.971765 39.152941-31.442824 0-43.128471-21.323294-43.12847-39.152941v-110.230588c0-29.394824 8.071529-50.718118 25.118117-65.837177 16.203294-14.275765 38.610824-21.383529 70.053647-21.383529h54.814118a267.685647 267.685647 0 0 0-27.828706-33.731765c-19.757176-22.287059-14.396235-40.96-9.878588-50.778353 8.071529-15.058824 21.504-23.973647 36.743529-23.973647a43.369412 43.369412 0 0 1 30.59953 13.312c3.614118 3.614118 8.071529 8.914824 13.43247 16.022589 5.421176 7.107765 11.685647 16.022588 18.913883 26.684235 11.625412 17.769412 22.407529 35.538824 32.286117 53.36847h128.421647V75.60533333c0-17.769412 10.842353-39.152941 43.128471-39.152941 32.346353 0 43.971765 21.383529 43.971765 39.152941v102.279529h136.553411c7.168-10.661647 15.239529-21.323294 22.467765-32.88847 9.818353-15.119059 19.696941-32.045176 29.635765-48.971294a45.537882 45.537882 0 0 1 22.407529-23.973647 40.357647 40.357647 0 0 1 30.539294-0.90353c7.228235 2.650353 13.492706 7.107765 18.853647 12.468706a35.659294 35.659294 0 0 1 11.685647 25.780706c0 11.565176-4.457412 27.587765-34.093176 68.487529h32.286118z m-532.540236 341.534118a46.622118 46.622118 0 0 1-30.539294-16.022588 57.825882 57.825882 0 0 1-16.143059-31.081412 169.381647 169.381647 0 0 1-3.614117-40.056471V388.76862733c0-15.119059 1.807059-27.587765 3.614117-37.345882 2.650353-12.468706 8.071529-22.287059 15.23953-30.298353 7.228235-8.854588 17.950118-14.215529 31.442823-15.962353 9.878588-0.903529 19.757176-1.807059 32.346353-1.807059h367.314824c30.539294 0 52.043294 8.011294 65.536 23.130353 11.685647 14.215529 17.950118 35.538824 17.950117 63.126588v46.260706c0 29.394824-6.264471 50.718118-20.660705 64.933647-13.432471 13.372235-34.093176 20.48-62.825412 20.48H326.415059c-12.589176 0-22.467765 0-31.442824-1.807059z m32.346353-129.867294h-0.903529v43.610353c0 5.360941 0.903529 7.107765 1.807059 8.011294h366.411294c-0.903529 0 0-2.650353 0-7.107765v-49.814588H327.318588v5.300706z m577.41553 527.480471c15.299765 11.565176 23.371294 24.877176 19.757176 39.152941 0 16.865882-9.878588 31.984941-26.925176 38.189176a36.743529 36.743529 0 0 1-17.046589 3.614118 64.451765 64.451765 0 0 1-31.442823-9.818353 2255.149176 2255.149176 0 0 0-139.14353-74.691765 2297.976471 2297.976471 0 0 0-155.407058-71.198117c-8.071529-4.397176-33.249882-15.058824-33.249883-39.152942 0-0.843294 0.903529-1.746824 0.90353-3.493647-5.421176 13.312-12.589176 26.684235-19.757177 39.152941-30.539294 53.308235-91.557647 93.364706-180.525176 119.145412-84.389647 24.937412-144.564706 37.345882-184.982588 37.345883-34.153412 0-45.778824-22.226824-45.778824-41.803295 0-8.854588 3.614118-36.442353 44.875294-44.453647 86.196706-11.565176 152.696471-26.684235 199.378824-43.610353 43.971765-16.865882 76.318118-39.152941 96.075294-66.68047 19.757176-27.587765 30.539294-71.137882 31.442823-129.867294 0-19.576471 9.035294-33.792 24.274824-39.996236H272.504471c-6.264471 0-8.975059 0-8.975059 14.21553v176.128c0 24.877176-17.046588 41.803294-43.068236 41.803294-25.178353 0-42.224941-16.022588-42.224941-41.803294v-184.139294c0-29.334588 8.071529-51.621647 23.311059-66.740706 15.299765-15.058824 37.767529-22.226824 68.306824-22.226824h489.411764c33.249882 0 55.717647 7.107765 70.053647 21.38353 13.492706 14.215529 20.660706 36.442353 20.660706 67.584v180.525176c0 24.937412-17.046588 41.803294-43.12847 41.803294-25.118118 0-42.164706-15.962353-42.164706-41.803294v-170.767059a31.503059 31.503059 0 0 0-1.807059-13.312c-1.807059-0.903529-3.614118-0.903529-7.228235-0.903529H524.890353c15.239529 6.204235 25.118118 20.48 25.118118 40.056471 0 37.345882-6.264471 72.884706-17.950118 107.580235 0.903529-0.843294 0.903529-1.807059 1.807059-2.650353 4.457412-8.914824 16.143059-15.119059 29.635764-15.119059 6.264471 0 15.239529 1.807059 54.814118 18.672941l98.785882 46.260706c20.600471 9.758118 40.357647 19.576471 60.114824 28.431059 20.660706 8.914824 40.417882 18.672941 59.271529 28.491294 19.757176 9.758118 35.056941 17.769412 45.778824 23.130353 9.938824 5.300706 16.263529 8.914824 18.913882 9.758118l3.614118 1.807059z"></path></symbol><symbol id="ic-diamond" viewBox="0 0 1026 1024"><path d="M751.144277 307.2l-123.016533-238.933333h159.778133a81.92 81.92 0 0 1 59.1872 25.258666l160.256 167.492267A27.306667 27.306667 0 0 1 987.620011 307.2h-236.475734z m270.506667 111.547733L640.927744 946.039467a27.306667 27.306667 0 0 1-48.128-24.234667L766.504277 375.466667h-56.388266l-170.5984 590.165333a27.306667 27.306667 0 0 1-52.462934 0.034133L315.500544 375.466667H259.112277l174.523734 545.5872a27.306667 27.306667 0 0 1-48.128 24.302933L5.160277 418.747733A27.306667 27.306667 0 0 1 27.346944 375.466667H999.464277a27.306667 27.306667 0 0 1 22.152534 43.281066zM18.301611 261.0176L178.557611 93.525333A81.92 81.92 0 0 1 237.744811 68.266667h159.744L274.506411 307.2H38.030677a27.306667 27.306667 0 0 1-19.729066-46.1824zM453.877077 68.266667h117.896534l122.9824 238.933333H330.894677l122.9824-238.933333z"></path></symbol><symbol id="ic-money" viewBox="0 0 1024 1024"><path d="M884.363636 512C884.363636 306.349242 717.650758 139.636364 512 139.636364 306.349242 139.636364 139.636364 306.349242 139.636364 512 139.636364 717.650758 306.349242 884.363636 512 884.363636 717.650758 884.363636 884.363636 717.650758 884.363636 512ZM46.545455 512C46.545455 254.936553 254.936553 46.545455 512 46.545455 769.063447 46.545455 977.454545 254.936553 977.454545 512 977.454545 769.063447 769.063447 977.454545 512 977.454545 254.936553 977.454545 46.545455 769.063447 46.545455 512ZM470.626262 520.334527 346.368469 520.334527C335.022727 520.334527 325.818182 511.082366 325.818182 499.669243L325.818182 478.939206C325.818182 467.431177 335.018859 458.273923 346.368469 458.273923L459.41918 458.273923 362.752701 343.071299C355.558764 334.497899 356.572921 321.312715 365.315879 313.976502L381.196011 300.65149C390.011671 293.254272 402.96653 294.447111 410.293884 303.179511L512.303444 424.749773 614.313007 303.179511C621.64036 294.447111 634.595221 293.254272 643.410879 300.65149L659.29101 313.976502C668.033969 321.312715 669.048129 334.497899 661.854189 343.071299L565.18771 458.273923 677.63153 458.273923C688.977273 458.273923 698.181818 467.526083 698.181818 478.939206L698.181818 499.669243C698.181818 511.177272 688.981141 520.334527 677.63153 520.334527L553.373738 520.334527 553.373738 582.395136 677.63153 582.395136C688.977273 582.395136 698.181818 591.647297 698.181818 603.060419L698.181818 623.790457C698.181818 635.298486 688.981141 644.455741 677.63153 644.455741L553.373738 644.455741 553.373738 737.562275C553.373738 748.871415 544.025139 758.175739 532.493056 758.175739L491.506944 758.175739C479.797853 758.175739 470.626262 748.946776 470.626262 737.562275L470.626262 644.455741 346.368469 644.455741C335.022727 644.455741 325.818182 635.203579 325.818182 623.790457L325.818182 603.060419C325.818182 591.552391 335.018859 582.395136 346.368469 582.395136L470.626262 582.395136 470.626262 520.334527Z"></path></symbol><symbol id="ic-others" viewBox="0 0 1024 1024"><path d="M232.727273 579.87878833C271.28679 579.87878833 302.545455 548.62012233 302.545455 510.06060633 302.545455 471.50108933 271.28679 440.24242433 232.727273 440.24242433 194.167756 440.24242433 162.909091 471.50108933 162.909091 510.06060633 162.909091 548.62012233 194.167756 579.87878833 232.727273 579.87878833ZM512 579.87878833C550.559516 579.87878833 581.818182 548.62012233 581.818182 510.06060633 581.818182 471.50108933 550.559516 440.24242433 512 440.24242433 473.440484 440.24242433 442.181818 471.50108933 442.181818 510.06060633 442.181818 548.62012233 473.440484 579.87878833 512 579.87878833ZM791.272727 579.87878833C829.832243 579.87878833 861.090909 548.62012233 861.090909 510.06060633 861.090909 471.50108933 829.832243 440.24242433 791.272727 440.24242433 752.713211 440.24242433 721.454545 471.50108933 721.454545 510.06060633 721.454545 548.62012233 752.713211 579.87878833 791.272727 579.87878833Z"></path></symbol><symbol id="ic-requests" viewBox="0 0 1024 1024"><path d="M418.909091 372.363636 418.909091 698.181818 605.090909 698.181818 605.090909 372.363636 696.24367 372.363638 511.582813 151.061383 326.921959 372.363638 418.909091 372.363636ZM325.818182 791.272727 325.818182 465.454545 139.636364 465.454545 512 10.219745 884.363636 465.454545 698.181818 465.454545 698.181818 791.272727 325.818182 791.272727ZM791.549193 930.909091C842.809195 930.909091 884.363636 889.589313 884.363636 837.818182L884.363636 744.727273 977.454545 744.727273 977.454545 884.363636C977.454545 961.482668 914.929478 1024 838.088048 1024L185.911951 1024C108.94196 1024 46.545455 961.32575 46.545455 884.363636L46.545455 744.727273 139.636364 744.727273 139.636364 837.818182C139.636364 889.230871 181.271913 930.909091 232.450806 930.909091L791.549193 930.909091Z"></path></symbol><symbol id="ic-follows" viewBox="0 0 1024 1024"><path d="M742.39037 893.84038533C732.980703 903.25005233 718.025272 903.19522133 708.767223 893.93717233L565.458115 753.71907433C556.207048 744.46800633 556.2434 729.40742933 565.554902 720.09592233L605.034543 682.83743133C614.444209 673.42776433 629.399645 673.48259533 638.657694 682.74064433L728.38723 766.49557833 941.491782 540.05939833C950.503205 531.04797933 965.609342 531.03876833 974.920848 540.35027433L1010.521307 576.49106033C1019.930973 585.90072733 1019.963043 600.76926333 1010.812183 609.92012233L742.39037 893.84038533ZM139.636364 859.15151533C139.636364 859.15151533 140.67734 830.50210333 143.721266 818.93653533 149.029303 798.76835333 158.415813 778.50853133 172.872966 759.57276033 185.195819 743.43246833 200.763606 728.89474933 220.104544 716.30744833 248.816792 697.62118933 341.214879 652.42733033 332.078782 657.40617733 390.138425 625.76575033 412.212292 582.79679733 388.559923 518.84814133 384.958515 509.11105133 363.507092 452.78421333 358.209139 437.93037933 342.817466 394.77685333 333.272371 357.97333033 324.783144 304.62989533 312.248334 225.86538933 369.770254 160.96969733 466.26749 160.96969733 571.044971 160.96969733 629.910798 218.91014833 619.986167 306.71758733 613.807085 361.38656133 604.889014 392.41438433 587.2357 428.78513033 587.680116 427.86951433 552.225592 496.14089933 539.29385 524.72497933L624.108763 563.09615833C635.7853 537.28656933 670.418623 470.59648633 670.983024 469.43366333 693.277635 423.50053933 705.13172 382.25771733 712.48809 317.17282433 728.985321 171.21479033 623.998925 67.87878833 466.26749 67.87878833 313.335459 67.87878833 211.18413 183.12496033 232.849136 319.26053733 242.258212 378.38399033 253.244797 420.74554033 270.528472 469.20365633 276.225846 485.17734633 297.956064 542.23624033 301.249676 551.14114433 307.065226 566.86458533 308.380666 564.30394833 287.532892 575.66524233 282.015993 578.67175233 275.594213 581.88642833 265.97112 586.50462633 270.601051 584.28268633 245.145458 596.43114733 238.070951 599.89143433 212.184458 612.55306833 190.997437 624.18127233 169.326586 638.28490833 140.984774 656.73008533 117.593202 678.57391433 98.881863 703.08175233 60.377931 753.51364533 47.027784 804.23828133 46.549412 840.92027533L46.545455 947.98348733 587.235705 947.98345933 512 859.15151533 139.636364 859.15151533Z"></path></symbol><symbol id="ic-chats" viewBox="0 0 1024 1024"><path d="M124.121212 139.636364C88.436364 139.636364 47.010909 181.527273 46.545455 217.212121L46.545455 799.030305C46.545455 842.472727 88.436364 884.363636 124.121212 876.606059L899.878786 876.606059C935.563636 884.363636 977.454545 842.472727 977.454545 799.030305L977.454545 217.212121C977.454545 181.527273 935.563636 139.636364 899.878786 139.636364L124.121212 139.636364ZM512 473.016869 139.636364 232.727273 884.363636 232.727273 512 473.016869ZM139.636364 791.272727 139.636364 331.612007 512 578.515503 884.363636 331.612007 884.363636 791.272727 139.636364 791.272727Z"></path></symbol><symbol id="ic-comments" viewBox="0 0 1024 1024"><path d="M977.454545 164.91403167C977.454545 113.60050467 935.731963 71.75757567 884.264546 71.75757567L139.735452 71.75757567C88.181004 71.75757567 46.545455 113.46514167 46.545455 164.91403167L46.545455 676.78293967C46.545455 728.09646367 88.22568 769.93939367 139.640844 769.93939367L186.181818 769.93939367 186.181818 956.12121167 512 769.93939367 884.524167 769.93939367C935.858506 769.93939367 977.454545 728.23182767 977.454545 676.78293967L977.454545 164.91403167ZM884.363636 164.84848467L884.363636 676.84848467 502.393986 676.84848467 279.272727 769.93939367 279.272727 676.84848467 139.636364 676.84848467 139.636364 164.84848467 884.363636 164.84848467Z"></path></symbol><symbol id="ic-likes" viewBox="0 0 1024 1024"><path d="M511.646501 852.318427C513.3925 850.741015 516.884503 847.586202 516.884503 847.586202 738.668074 646.043071 808.239081 574.380446 853.64177 489.88787 874.584837 450.913673 884.363636 415.390578 884.363636 379.345455 884.363636 287.398144 813.401856 216.436364 721.454545 216.436364 669.217853 216.436364 616.89613 241.028421 582.874945 280.979901L512 364.209197 441.125053 280.979901C407.103871 241.028421 354.782148 216.436364 302.545455 216.436364 210.598144 216.436364 139.636364 287.398144 139.636364 379.345455 139.636364 415.547805 149.501383 451.227391 170.635978 490.39044 216.182926 574.790321 286.220326 646.813794 507.042118 847.054141 507.042118 847.054141 490.96233 871.005342 511.646501 852.318427ZM512 220.625455 578.083025 164.351628C620.609936 138.33686 670.384463 123.345455 721.454545 123.345455 864.814545 123.345455 977.454545 235.985455 977.454545 379.345455 977.454545 555.287273 819.2 698.647273 579.490909 916.48L512 977.454545 444.509091 916.014545C204.8 698.647273 46.545455 555.287273 46.545455 379.345455 46.545455 235.985455 159.185455 123.345455 302.545455 123.345455 353.615536 123.345455 403.390064 138.33686 445.916975 164.351628L512 220.625455Z"></path></symbol><symbol id="ic-nav-mode" viewBox="0 0 1024 1024"><path d="M194.56 597.333333l-64.853333 166.4c-2.858667 9.088-3.413333 15.786667-1.706667 20.053334 1.706667 4.266667 10.24 6.954667 25.6 8.106666l56.32 4.266667v24.746667a521.557333 521.557333 0 0 0-34.56-1.28c-17.365333-0.298667-40.832-0.426667-70.4-0.426667s-53.034667 0.128-70.4 0.426667c-17.365333 0.298667-28.885333 0.725333-34.56 1.28v-24.746667l53.76-4.266667c18.773333-1.706667 31.872-12.245333 39.253333-31.573333L292.693333 256h41.813334l188.586666 498.346667c3.968 9.685333 7.68 16.213333 11.093334 19.626666 3.413333 3.413333 9.685333 6.528 18.773333 9.386667l46.933333 14.506667v23.893333a1946.538667 1946.538667 0 0 0-99.84-2.56h-71.68c-45.525333 0-82.773333 0.853333-111.786666 2.56v-23.893333l53.76-8.533334c16.512-2.858667 25.898667-6.272 28.16-10.24 2.261333-3.968 1.152-11.648-3.413334-23.04L336.213333 597.333333H194.56z m127.146667-39.253333L271.36 398.506667l-61.44 159.573333h111.786667z m427.52 273.92c-23.338667 0-43.392-4.138667-60.16-12.373333a110.805333 110.805333 0 0 1-40.96-33.706667 146.816 146.816 0 0 1-23.466667-50.346667c-5.12-19.328-7.68-40.106667-7.68-62.293333 0-30.165333 4.565333-56.874667 13.653333-80.213333 9.088-23.338667 21.333333-42.965333 36.693334-58.88a153.6 153.6 0 0 1 53.76-36.266667 171.946667 171.946667 0 0 1 64.853333-12.373333c15.914667 0 29.866667 1.152 41.813333 3.413333 11.946667 2.261333 21.888 4.821333 29.866667 7.68 9.685333 2.858667 17.621333 6.272 23.893333 10.24l56.32-31.573333 7.68 2.56v262.826666c0 22.741333 9.685333 33.578667 29.013334 32.426667 4.565333 0 8.106667-0.725333 10.666666-2.133333s4.992-2.688 7.253334-3.84c2.261333-1.706667 4.266667-3.413333 5.973333-5.12l5.12 11.946666c-4.565333 10.794667-10.538667 20.48-17.92 29.013334-6.272 7.381333-14.634667 14.08-25.173333 20.053333-10.538667 5.973333-23.466667 8.96-38.826667 8.96-25.045333 0-42.794667-7.552-53.333333-22.613333-10.538667-15.061333-15.786667-33.408-15.786667-55.04v-20.48a181.888 181.888 0 0 1-12.373333 36.266666 129.92 129.92 0 0 1-20.053334 31.146667 92.373333 92.373333 0 0 1-29.44 22.186667 93.44 93.44 0 0 1-41.386666 8.533333z m103.253333-196.266667c0-11.946667-0.554667-24.448-1.706667-37.546666a143.872 143.872 0 0 0-7.68-36.266667 66.858667 66.858667 0 0 0-18.346666-27.733333c-8.234667-7.381333-19.498667-11.093333-33.706667-11.093334-7.978667 0-16.341333 2.133333-25.173333 6.4-8.832 4.266667-16.938667 11.221333-24.32 20.906667-7.381333 9.685333-13.525333 22.912-18.346667 39.68-4.821333 16.768-7.253333 37.418667-7.253333 61.866667 0 17.066667 1.28 33.28 3.84 48.64 2.56 15.36 6.698667 28.714667 12.373333 40.106666 5.674667 11.392 12.672 20.352 20.906667 26.88 8.234667 6.528 18.048 9.813333 29.44 9.813334 11.392 0 21.333333-3.712 29.866666-11.093334 8.533333-7.381333 15.786667-17.194667 21.76-29.44 5.973333-12.245333 10.538667-26.325333 13.653334-42.24 3.114667-15.914667 4.693333-32.426667 4.693333-49.493333v-9.386667z"></path></symbol><symbol id="ic-write" viewBox="0 0 1024 1024"><path d="M151.007 942.26766666c-22.993 21.261-64.594 64.683-43.381-35.512 37.218-163.524 447.875-792.517 794.003-852.861 97.053 0-180.459 232.311-180.459 232.311 0 0 95.338 11.846 157.962-54.296-37.533 195.818-214.91 195.149-260.719 210.729 53.59 7.89 93.441 31.594 176.379 7.368-20.222 55.519-100.075 123.839-387.175 191.454-126.92 45.617-233.617 279.547-256.61 300.808z"></path></symbol><symbol id="ic-night" viewBox="0 0 1024 1024"><path d="M386.573124 0C340.147815 173.910685 384.73085 366.612567 521.059141 502.940859 657.387432 639.26915 850.089314 683.852184 1024 637.426876 1001.155802 722.908399 956.572765 804.336916 889.51398 871.395701 686.126909 1074.782772 355.991373 1074.782772 152.6043 871.395701-50.782772 668.00863-50.782772 337.87309 152.6043 134.486017 219.663081 67.427236 301.091602 22.8442 386.573124 0Z"></path></symbol><symbol id="ic-mark" viewBox="0 0 1024 1024"><path d="M268.190476 113.777778C214.552381 113.777778 171.154286 155.291291 171.154286 206.03003L170.666667 967.111111 512 828.732735 853.333333 967.111111 853.333333 206.03003C853.333333 155.291291 809.447617 113.777778 755.809525 113.777778L268.190476 113.777778Z"></path></symbol><symbol id="ic-user" viewBox="0 0 1081 1024"><path d="M803.557507 705.46529267C921.627438 734.68811367 1009.013675 841.17086467 1009.013675 968.09948167L1009.013675 999.65574867 113.777778 999.65574867 113.777778 968.09948167C113.777778 845.98765767 194.87339 742.62628167 306.138642 709.26557267 386.042902 689.94662967 446.772745 624.07875167 455.097973 555.06783567 413.092784 526.09210167 380.671395 482.61667367 369.546671 434.01441967L331.247877 266.69273867C301.999138 138.90939267 384.447284 35.55555567 515.334601 35.55555567L604.020878 35.55555567C735.179184 35.55555567 819.313243 139.39951167 792.544825 267.49752267L757.903491 433.27071867C747.227432 484.36012067 713.120956 529.80140967 668.826761 558.82664367 675.211167 624.51970267 729.457687 683.91321067 803.557507 705.46529267Z"></path></symbol><symbol id="ic-setting" viewBox="0 0 1024 1024"><path d="M846.327484 515.083444C846.327484 499.504829 844.9529 484.842604 843.120122 470.180378L939.799171 394.578276C948.504866 387.705358 950.795839 375.334105 945.297505 365.253825L853.658596 206.718508C848.160262 196.638228 835.78901 192.972672 825.708726 196.638228L711.618281 242.457684C687.792168 224.129902 662.133271 209.009481 634.183401 197.554617L616.772011 76.13306C615.397427 65.136391 605.775343 56.888889 594.320475 56.888889L411.042655 56.888889C399.587791 56.888889 389.965705 65.136391 388.591122 76.13306L371.179729 197.554617C343.22986 209.009481 317.570966 224.588096 293.744849 242.457684L179.654404 196.638228C169.11593 192.514478 157.202871 196.638228 151.704536 206.718508L60.065625 365.253825C54.109096 375.334105 56.858263 387.705358 65.56396 394.578276L162.243011 470.180378C160.410233 484.842604 159.035649 499.963024 159.035649 515.083444 159.035649 530.203865 160.410233 545.324285 162.243011 559.986511L65.56396 635.588614C56.858263 642.461531 54.567291 654.832782 60.065625 664.913067L151.704536 823.448383C157.202871 833.528661 169.574124 837.194217 179.654404 833.528661L293.744849 787.709207C317.570966 806.036986 343.22986 821.15741 371.179729 832.612272L388.591131 947.866943C389.965715 958.86361 399.587801 967.111111 411.042665 967.111111L594.320486 967.111111C605.775349 967.111111 615.397439 958.86361 616.772022 947.866943L634.183401 832.612272C662.133271 821.15741 687.792168 805.578792 711.618281 787.709207L825.708726 833.528661C836.247205 837.652412 848.160262 833.528661 853.658596 823.448383L945.297505 664.913067C950.795839 654.832782 948.504866 642.461531 939.799171 635.588614L843.120122 559.986511C844.9529 545.324285 846.327484 530.662059 846.327484 515.083444ZM502.681566 675.45154C414.250017 675.45154 342.313471 603.514994 342.313471 515.083444 342.313471 426.651895 414.250017 354.71535 502.681566 354.71535 591.113114 354.71535 663.04966 426.651895 663.04966 515.083444 663.04966 603.514994 591.113114 675.45154 502.681566 675.45154L502.681566 675.45154Z"></path></symbol><symbol id="ic-wallet" viewBox="0 0 1081 1024"><path d="M78.590372 320.640733C79.612385 263.784132 108.255224 220.849417 161.254046 208.613675L811.774629 58.429164C843.73446 51.050656 875.603143 70.885317 882.986092 102.864395L930.36408 264.731771C930.36408 264.731771 432.674221 267.670638 193.893052 264.731771 191.508185 264.702418 137.002048 273.909722 137.002047 320.464627L888.060649 320.640726C942.735462 320.640726 988.818119 385.402493 988.818119 439.966797L988.818119 835.991046C988.818119 890.695509 928.709194 947.609862 874.118087 947.609862L193.893052 947.609862C139.218237 947.609862 78.590372 890.555352 78.590372 835.991046L78.590372 320.640733ZM870.350433 600.907349C870.350433 562.701243 839.378261 531.729073 801.172156 531.729073 762.96605 531.729073 731.993879 562.701243 731.993879 600.907349 731.993879 639.113461 762.96605 670.085626 801.172156 670.085626 839.378261 670.085626 870.350433 639.113461 870.350433 600.907349Z"></path></symbol><symbol id="ic-like-filled" viewBox="0 0 1024 1024"><path d="M455.286273 907.310814C215.315919 689.706627 56.888889 546.190377 56.888889 370.056797 56.888889 226.540546 169.651657 113.777778 313.167908 113.777778 394.24527 113.777778 472.0609 151.520688 522.850741 211.163805 573.640585 151.520688 651.45621 113.777778 732.533578 113.777778 876.049829 113.777778 988.812595 226.540546 988.812595 370.056797 988.812595 546.190377 830.385567 689.706627 590.415212 907.776774L522.850741 968.817778 455.286273 907.310814Z"></path></symbol><symbol id="ic-feedback" viewBox="0 0 1024 1024"><path d="M158.037561 937.474543C158.037561 937.474543 428.526853 971.883105 479.47676 768.097638L795.921232 768.097638C859.047925 768.097638 910.222222 716.754256 910.222222 654.123816L910.222222 227.7516C910.222222 164.805596 859.18947 113.777778 796.11115 113.777778L227.888848 113.777778C164.867044 113.777778 113.777778 165.12116 113.777778 227.7516L113.777778 654.123816C113.777778 717.069824 164.241867 768.097638 227.072055 768.097638L285.060607 768.097638C254.825383 906.665296 158.037561 937.474543 158.037561 937.474543ZM284.444444 512 625.777778 512 625.777778 597.333333 284.444444 597.333333 284.444444 512 284.444444 512ZM284.473374 312.888889 739.584484 312.888889 739.584484 398.222222 284.473374 398.222222 284.473374 312.888889 284.473374 312.888889Z"></path></symbol><symbol id="ic-signout" viewBox="0 0 1024 1024"><path d="M376.88888867 568.888889L746.66666667 568.888889 632.88888867 682.666667 703.99999967 755.238935 945.77777767 540.444444 945.77777767 483.555556 703.99999967 270.947385 632.88888867 341.333333 746.66666667 455.111111 376.88888867 455.111111 376.88888867 568.888889ZM489.07269967 113.777778L489.07269967 227.888848 206.20427767 227.888848 206.20427767 796.111167 489.07269967 796.111167 489.07269967 910.222222 206.20427967 910.222222C143.37645767 910.222222 92.44444467 859.18947 92.44444467 796.11115L92.44444467 227.888848C92.44444467 164.867044 143.37274867 113.777778 206.20427967 113.777778L489.07269967 113.777778Z"></path></symbol><symbol id="ic-nav-discover" viewBox="0 0 1024 1024"><path d="M13.3565216 512C13.3565216 236.60633067 236.60633067 13.3565216 512 13.3565216S1010.6434784 236.60633067 1010.6434784 512 787.39366933 1010.6434784 512 1010.6434784 13.3565216 787.39366933 13.3565216 512z m926.05217387 0a427.40869547 427.40869547 0 1 0-854.81739094 0 427.40869547 427.40869547 0 0 0 854.81739094 0z m-321.3638496-253.548336c120.29180267-82.53736853 173.6704-39.4165792 119.4369856 95.9295072l-104.9525792 261.6691008-217.9784352 148.8332064c-120.434272 82.1574496-175.90242347 37.70694507-124.13848107-98.6364288l93.93493333-247.42214507 233.65008747-160.37324053zM512 583.23478293a71.23478293 71.23478293 0 1 0 0-142.46956586 71.23478293 71.23478293 0 0 0 0 142.46956586z"></path></symbol><symbol id="ic-nav-notification" viewBox="0 0 1024 1024"><path d="M513.024 1001.828174A111.88313 111.88313 0 0 0 625.39687 890.434783H400.695652a111.88313 111.88313 0 0 0 112.328348 111.393391z m-320.823652-489.293913v5.030956c0 43.408696-13.445565 84.591304-36.062609 122.301218-8.013913 13.312-16.562087 25.154783-25.065739 35.350261-4.897391 5.921391-8.592696 9.794783-10.329043 11.486608l-3.250087 3.650783C57.433043 768.934957 96.478609 845.913043 196.118261 845.913043h634.434782c99.906783 0 135.43513-75.063652 74.306783-153.11026l-1.736348-2.181566-2.048-1.869913a180.535652 180.535652 0 0 1-11.53113-11.976347 298.206609 298.206609 0 0 1-27.603478-36.151653c-24.709565-38.021565-39.357217-79.070609-39.357218-121.366261 0-2.31513 0-4.630261 0.089044-6.945391l-0.044522-76.755478c0-132.096-84.591304-258.626783-189.350957-283.202783C624.951652 91.447652 571.65913 44.521739 507.458783 44.521739 437.426087 44.521739 395.931826 92.16 382.085565 151.863652 268.332522 200.214261 192.333913 310.761739 192.333913 435.556174v63.933217c-0.133565 3.116522-0.133565 6.233043-0.089043 13.089392z m65.80313-72.525913c0-105.427478 67.31687-198.210783 166.199652-232.848696l21.99374-7.657739v-29.028174c0-33.124174 27.38087-60.237913 61.261913-60.237913 33.836522 0 61.217391 27.113739 61.217391 60.237913v29.028174l21.993739 7.702261C689.508174 241.797565 756.869565 334.625391 756.869565 440.05287l0.089044 77.06713-0.089044 7.568696c0 56.765217 18.788174 109.968696 49.775305 158.230261 18.432 28.672 36.953043 49.597217 49.997913 61.618086l-3.739826-4.096c28.093217 36.285217 22.216348 48.88487-22.394435 48.88487H196.118261c-45.456696 0-53.426087-15.894261-26.178783-52.001391l-3.250087 3.695304c12.02087-11.798261 29.072696-32.411826 45.946435-60.816696 28.226783-47.549217 45.278609-100.396522 45.278609-157.250782v-5.431652l0.044522-11.842783V440.008348z"></path></symbol><symbol id="ic-nav-follow" viewBox="0 0 1024 1024"><path d="M725.25913 780.14701467L721.474783 780.05797067H868.173913c24.620522 0 44.521739-19.945739 44.521739-44.744347V134.71536267A44.521739 44.521739 0 0 0 868.08487 89.97101467H155.91513C131.33913 89.97101467 111.304348 110.00579667 111.304348 134.71536267v600.598261A44.432696 44.432696 0 0 0 155.737043 780.05797067h146.832696l-3.784348 0.089044c69.053217-3.873391 154.757565 43.186087 213.036522 106.184348 51.778783-60.594087 125.373217-111.170783 213.437217-106.184348zM44.521739 735.31362367V134.71536267A111.482435 111.482435 0 0 1 155.91513 23.18840567h712.16974A111.304348 111.304348 0 0 1 979.478261 134.71536267v600.598261a111.34887 111.34887 0 0 1-111.304348 111.526956h-146.69913c-66.960696-3.784348-172.78887 74.885565-201.861566 145.67513-4.541217 11.130435-10.685217 10.596174-15.449043-0.756869-29.606957-70.611478-134.90087-148.702609-201.594435-144.918261H155.737043A111.215304 111.215304 0 0 1 44.521739 735.31362367zM489.73913 179.01449267h44.52174V735.53623167h-44.52174V179.01449267z m333.913044 178.086957V290.31884067H623.304348v66.782609h200.347826zM623.304348 512.92753667h200.347826v-66.782609H623.304348V512.92753667zM200.347826 357.10144967H400.695652V290.31884067H200.347826v66.782609z m0 155.826087H400.695652v-66.782609H200.347826V512.92753667z"></path></symbol><symbol id="ic-nav-download" viewBox="0 0 1024 1024"><path d="M222.608696 133.342609C222.608696 84.279652 262.41113 44.521739 311.785739 44.521739h400.428522C761.455304 44.521739 801.391304 84.680348 801.391304 133.342609v757.314782A88.909913 88.909913 0 0 1 712.214261 979.478261H311.785739A89.266087 89.266087 0 0 1 222.608696 890.657391V133.342609zM445.217391 912.695652c0-12.288 9.616696-22.26087 22.038261-22.260869h89.488696c12.154435 0 22.038261 10.329043 22.038261 22.260869 0 12.288-9.616696 22.26087-22.038261 22.26087h-89.488696a22.394435 22.394435 0 0 1-22.038261-22.26087zM289.391304 845.913043h445.217392V111.304348h-445.217392V845.913043zM356.173913 489.73913l155.826087 184.141913L667.826087 489.73913h-89.043478V356.173913h-133.565218v133.565217H356.173913z"></path></symbol><symbol id="ic-paid" viewBox="0 0 1024 1024"><path d="M511.850132 0C229.23293 0 0.000088 229.132871 0.000088 511.850044s229.132871 511.850044 511.850044 511.850044 511.850044-229.232842 511.850044-511.850044-229.132871-511.850044-511.850044-511.850044z m226.833545 576.031241c29.191448 0 52.984477 23.693059 52.984477 52.884506 0 14.195841-5.398418 27.491946-15.195548 37.289076-9.997071 9.997071-23.293176 15.39549-37.588988 15.395489H564.034843v173.649127c0 29.091477-23.593088 52.584594-52.484623 52.584594-29.091477 0-52.884506-23.693059-52.984478-52.684565V681.800254H285.016587c-29.191448 0-52.884506-23.693059-52.884507-52.884507s23.693059-52.884506 52.884507-52.884506h173.449185V454.766768H284.816646c-29.191448 0-52.884506-23.593088-52.884507-52.584595s23.693059-52.584594 52.884507-52.584594H474.161173L330.703202 205.939666c-10.097042-9.997071-15.595431-23.193205-15.595431-37.289075 0-14.09587 5.498389-27.491946 15.595431-37.489017 9.997071-9.997071 23.093234-15.39549 37.189105-15.39549 14.09587 0 27.292004 5.498389 37.289075 15.595431l116.46588 116.465879L637.813229 131.261544c9.997071-10.097042 23.193205-15.595431 37.389046-15.595431 14.09587 0 27.192034 5.498389 37.189104 15.39549 20.493996 20.593967 20.593967 54.184126 0 74.678122L569.23332 349.597579h169.350386c29.191448 0 52.984477 23.593088 52.984477 52.584594 0 27.591916-21.493703 50.285268-48.685736 52.484624h-178.947574V576.131212h174.748804v-0.099971z"></path></symbol></svg><div id="__next"><header style="width:100%"><div class="_1CSgtu"><div class="_2oDcyf"><a class="_1AawTM _1OhGeD" href="https://www.jianshu.com/" aria-label="简书" target="_blank" rel="noopener noreferrer"><svg class="wCYvWN" style="width:60px;height:30px" width="60" height="30" focusable="false" aria-hidden="true" viewBox="0 0 106 50" version="1.1"><g><path d="M79.6542664,49.2735656 L75.6602511,49.6932377 L75.6602511,27.3313525 L59.1137321,27.3313525 C58.6314725,27.3313525 57.9655336,26.8821721 57.8498237,26.1776639 L57.5346557,23.1870902 L75.6602511,23.1887295 L75.6602511,12.1260246 L62.1759992,12.1260246 C61.6180832,12.0858607 61.0229458,11.7788934 60.8894344,10.9870902 L60.5819534,7.93790984 L75.6602511,7.93790984 L75.6602511,0.409631148 L81.2074496,0.409631148 L81.2074496,7.93790984 L97.4727855,7.93790984 L97.4727855,23.1887295 L103.836831,23.1887295 L103.836831,38.1235656 C103.836831,42.2026639 100.70174,44.4715164 97.7187702,44.4715164 L92.357274,44.4715164 C91.6217473,44.4715164 91.0290374,43.9440574 90.9659229,43.3719262 L90.6681519,40.5223361 L92.1274725,40.5223361 L95.7933733,40.5223361 C97.0864115,40.5223361 98.3321137,39.6739754 98.3321137,38.1235656 L98.3321137,27.3313525 L81.2074496,27.3313525 L81.2074496,47.4452869 C81.2074496,48.5985656 80.4148771,49.1264344 79.6542664,49.2735656 L79.6542664,49.2735656 Z M81.260045,22.917418 L91.9745412,22.917418 L91.9745412,12.0514344 L81.260045,12.0514344 L81.260045,22.917418 Z M104.57519,13.9920082 L100.167289,13.9920082 C99.5871214,9.9170082 97.5274038,5.26987705 95.0355947,1.96209016 L100.167289,1.96209016 C102.583037,4.95553279 104.693327,8.85922131 105.720556,12.5608607 C105.867015,13.1711066 105.472144,13.9920082 104.57519,13.9920082 L104.57519,13.9920082 Z"></path><path d="M4.98236412,12.0515574 L9.99834885,12.0515574 C11.3953641,13.8056557 12.3169977,15.077377 13.7310053,18.5515574 C13.8337687,18.8339344 13.9130664,20.2007377 12.5900893,20.2007377 L8.57624962,20.2007377 C7.43047863,15.8630328 6.43521145,14.337623 4.97831832,12.0540164 C3.51980687,13.0105738 1.86507405,13.8138525 -4.04580153e-05,14.3802459 L-4.04580153e-05,10.3880328 C2.35987557,9.24172131 4.08662366,7.6892623 5.34608168,5.85278689 C6.43399771,4.2654918 7.18206641,2.47901639 7.58300534,0.409754098 L11.8043947,0.409754098 C12.772555,0.409754098 13.2313489,1.06877049 13.0962191,1.56139344 C12.9129443,2.1392623 12.5342573,2.99377049 12.1640664,3.78270492 L25.2676084,3.78270492 L25.0038221,6.30278689 C24.9370664,6.85483607 24.5227763,7.57532787 23.6181351,7.57532787 L17.5377,7.57532787 C18.2930511,9.24336066 18.7571046,10.7601639 18.9112496,11.3568852 C19.0508298,11.9036066 18.7004634,12.7810656 17.765074,12.7810656 L13.9850817,12.7810656 C13.7127992,10.9581148 13.4073412,9.70811475 12.633784,7.57532787 L9.82963893,7.57532787 C8.54266947,9.20852459 6.93891374,10.7679508 4.98236412,12.0515574 L4.98236412,12.0515574 Z M14.1651198,43.4847541 L14.1651198,22.1413115 L34.8367382,22.1413115 L34.8367382,36.8896721 C34.9253412,41.1093443 31.729158,43.4847541 28.4929214,43.4847541 L14.1651198,43.4847541 Z M35.3776618,49.3056557 C34.6793565,49.3056557 34.1008069,48.7921311 34.0028985,48.0851639 L33.669929,45.2757377 L38.4682496,45.2372131 C39.5310817,45.2372131 40.5696389,44.5277869 40.5696389,42.9769672 L40.5696389,18.4761475 L16.1390664,18.4761475 C15.6288908,18.4761475 15.0078603,18.2769672 14.819326,17.2298361 L14.5478527,14.3802459 L45.940845,14.3802459 L45.940845,43.4048361 C45.940845,45.4257377 44.1275168,49.2339344 39.6552878,49.3056557 L35.3776618,49.3056557 Z M6.84505115,49.2904918 L3.0626313,49.6933607 L3.0626313,20.2007377 L8.42250916,20.2007377 L8.42250916,47.3646721 C8.42250916,48.0146721 8.09399008,49.0794262 6.84505115,49.2904918 L6.84505115,49.2904918 Z M41.1040893,12.617541 L37.1335397,12.617541 C36.8025931,10.8986885 36.5436618,9.44581967 35.7462344,7.47942623 L32.2174863,7.47942623 C31.3132496,8.52245902 30.2645779,9.69581967 28.8404557,10.8204098 C27.3799214,11.9736885 25.5018603,13.1154918 22.9704023,13.9917213 L22.9704023,9.96672131 C27.0331962,7.6904918 29.0237305,4.6007377 29.9906771,0.409754098 L34.2080206,0.409754098 C35.3258756,0.409754098 35.6547992,1.21385246 35.5848069,1.4892623 C35.3121198,2.35811475 34.9075397,2.9892623 34.6032954,3.70360656 L48.620784,3.70360656 L48.3602344,6.23434426 C48.2724405,6.99745902 47.669616,7.47942623 47.0243107,7.47942623 L40.7173107,7.47942623 C41.4892496,9.14459016 41.945616,10.3318852 42.1398145,11.2503279 C42.223158,11.6478689 41.9775779,12.5761475 41.1040893,12.617541 L41.1040893,12.617541 Z M19.1422649,39.6040164 L27.579784,39.6040164 C29.230471,39.6040164 29.861616,38.5290164 29.861616,37.3347541 L29.861616,34.5634426 L19.1693718,34.5589344 L19.1422649,39.6040164 Z M19.1422649,30.6786066 L29.8620206,30.6786066 L29.8620206,26.0220492 L19.1422649,26.0220492 L19.1422649,30.6786066 Z"></path></g></svg></a><div class="_7hb9O4"><i aria-label="ic-nav-mode" tabindex="-1" class="anticon _1nZg8v"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#ic-nav-mode"></use></svg></i><span class="_1jKNin" aria-label="简书钻"><svg class="wCYvWN" style="width:54px;height:24px" width="54" height="24" focusable="false" aria-hidden="true" viewBox="0 0 50 22" version="1.1"><g transform="translate(1.000000, 4.000000)" fill="#EA6F5A" stroke="#EA6F5A" stroke-width="0.5"><path d="M6.97355121,0.977899795 L5.71487604,5.02704222 L14.0382941,5.02704222 L12.7812515,0.977899795 L6.97355121,0.977899795 Z M5.94914309,0.977899795 L5.39898286,0.977899795 C5.34645865,0.977985274 5.29616908,0.99894266 5.25940216,1.03606786 L1.33563333,5.02704222 L4.69046792,5.02704222 L5.94914309,0.977899795 Z M8.80687445,13.8613144 L4.56068234,5.99650966 L1.40664806,5.99650966 L8.80687445,13.8613144 Z M5.67079793,5.99650966 L9.99290234,14.0010793 L14.0962487,5.99650966 L5.67079793,5.99650966 Z M6.61929374,0.00843234872 L14.581108,0.00843234872 C14.8986337,0.00843234872 15.2014667,0.135271015 15.4234898,0.359864308 L19.6476429,4.6562209 C20.0841892,5.10085541 20.0917287,5.80620568 19.6647844,6.25988166 L10.8491606,15.6281688 C10.4068293,16.0970986 9.66444122,16.1231211 9.18970108,15.6863369 C9.1594994,15.6580607 9.1594994,15.6580607 9.13093026,15.6281688 L0.315306487,6.25988166 C-0.111412478,5.80599166 -0.10351395,5.10063881 0.333264249,4.6562209 L4.55741731,0.359864308 C4.7786002,0.135221626 5.08206407,0.00849721138 5.39898286,0.00843234872 L6.62011001,0.00843234872 L6.61929374,0.00843234872 Z M13.8056596,0.977899178 L15.0643348,5.02704222 L18.6452738,5.02704222 L14.721505,1.03606786 C14.6845399,0.998742398 14.6339153,0.977768057 14.581108,0.977899795 L13.8056596,0.977899178 Z M11.1487286,13.8879747 L18.5742591,5.99650966 L15.1949366,5.99650966 L11.1487286,13.8879747 Z"></path></g><g transform="translate(19.000000, 5.000000)"><path d="M5.16425826,0.266666667 C3.98605079,0.266666667 3.03092493,1.22179253 3.03092493,2.4 L3.03092493,8.73301908 L2.96783132,8.90526634 L1.31769477,10.8555055 C1.236217,10.9518012 1.19150756,11.0738592 1.19150756,11.2 C1.19150756,11.4945519 1.43028903,11.7333333 1.72484089,11.7333333 L26.5448138,11.7333333 C27.7230213,11.7333333 28.6781471,10.7782075 28.6781471,9.6 L28.6781471,2.4 C28.6781471,1.22179253 27.7230213,0.266666667 26.5448138,0.266666667 L5.16425826,0.266666667 Z" stroke="#EA6F5A" stroke-width="0.533333333" fill="#EA6F5A"></path><path d="M6.79203604,2 L7.57631592,2 L7.57631592,4.96927224 C7.96845586,4.26091644 8.52725527,3.9115903 9.25271416,3.9115903 C9.96836954,3.9115903 10.5369725,4.17358491 10.9487194,4.71698113 C11.3212523,5.20215633 11.5173223,5.80377358 11.5173223,6.54123989 C11.5173223,7.29811321 11.3212523,7.91913747 10.9487194,8.40431267 C10.527169,8.92830189 9.94876255,9.2 9.21350016,9.2 C8.42922028,9.2 7.87042087,8.87978437 7.52729842,8.2393531 L7.52729842,9.06415094 L6.79203604,9.06415094 L6.79203604,2 Z M9.08605468,4.55202156 C8.62529025,4.55202156 8.25275731,4.72668464 7.97825935,5.09541779 C7.6841544,5.45444744 7.54690542,5.92991914 7.54690542,6.51212938 L7.54690542,6.60916442 C7.54690542,7.17196765 7.6743509,7.62803235 7.92924186,7.97735849 C8.20373982,8.36549865 8.60568326,8.55956873 9.11546518,8.55956873 C9.66446109,8.55956873 10.076208,8.35579515 10.350706,7.96765499 C10.5859899,7.61832884 10.7134354,7.14285714 10.7134354,6.54123989 C10.7134354,5.93962264 10.5859899,5.47385445 10.331099,5.13423181 C10.0467975,4.74609164 9.6350506,4.55202156 9.08605468,4.55202156 Z M14.6250313,3.9115903 C15.4387217,3.9115903 16.0563421,4.18328841 16.468089,4.72668464 C16.840622,5.21185984 17.0366919,5.90080863 17.0562989,6.77412399 L13.0564716,6.77412399 C13.0956856,7.33692722 13.242738,7.77358491 13.517236,8.08409704 C13.7917339,8.39460916 14.1740704,8.54986523 14.6544418,8.54986523 C15.0661888,8.54986523 15.4093112,8.44312668 15.6642022,8.2393531 C15.8798791,8.06469003 16.0465386,7.80269542 16.1739841,7.45336927 L16.958264,7.45336927 C16.840622,7.93854447 16.6151415,8.32668464 16.2720191,8.63719677 C15.8504686,9.00592992 15.3112762,9.2 14.6544418,9.2 C13.9289829,9.2 13.340773,8.9574124 12.9094191,8.4916442 C12.4584582,8.006469 12.2427812,7.36603774 12.2427812,6.5509434 C12.2427812,5.81347709 12.4486547,5.19245283 12.8800086,4.69757412 C13.3113625,4.17358491 13.8897689,3.9115903 14.6250313,3.9115903 Z M14.6446383,4.56172507 C14.1936774,4.56172507 13.8309479,4.70727763 13.55645,4.99838275 C13.281952,5.28948787 13.1250961,5.67762803 13.0760786,6.17250674 L16.2426086,6.17250674 C16.1445736,5.09541779 15.6053812,4.56172507 14.6446383,4.56172507 Z M19.3307106,2.42695418 L19.3307106,4.04743935 L20.5855584,4.04743935 L20.5855584,4.69757412 L19.3307106,4.69757412 L19.3307106,7.89002695 C19.3307106,8.07439353 19.3601211,8.21024259 19.4385491,8.28787062 C19.5071736,8.36549865 19.634619,8.41401617 19.811082,8.41401617 L20.4581129,8.41401617 L20.4581129,9.06415094 L19.69344,9.06415094 C19.2816931,9.06415094 18.9777846,8.9574124 18.8013217,8.74393531 C18.6346622,8.54986523 18.5562342,8.26846361 18.5562342,7.89002695 L18.5562342,4.69757412 L17.5366704,4.69757412 L17.5366704,4.04743935 L18.5562342,4.04743935 L18.5562342,2.74716981 L19.3307106,2.42695418 Z M23.6638569,3.9115903 C24.3893158,3.9115903 24.9187047,4.09595687 25.2716307,4.47439353 C25.5657356,4.80431267 25.7225916,5.26037736 25.7225916,5.8425876 L25.7225916,9.06415094 L24.9873292,9.06415094 L24.9873292,8.21994609 C24.7912592,8.4916442 24.5265648,8.7245283 24.2030493,8.89919137 C23.8305164,9.09326146 23.408966,9.2 22.9482015,9.2 C22.4384196,9.2 22.0266727,9.06415094 21.7325677,8.81185984 C21.4188558,8.54986523 21.2619998,8.20053908 21.2619998,7.7541779 C21.2619998,7.11374663 21.5168907,6.64797844 22.0364762,6.35687332 C22.4482231,6.11428571 23.016826,5.98814016 23.7226779,5.98814016 L24.9383117,5.97843666 L24.9383117,5.81347709 C24.9383117,4.96927224 24.4971543,4.55202156 23.6148394,4.55202156 C23.212896,4.55202156 22.8893805,4.6296496 22.6540966,4.80431267 C22.3992056,4.97897574 22.2423496,5.23126685 22.1835286,5.58059299 L21.4090523,5.58059299 C21.4874803,5.00808625 21.7325677,4.58113208 22.1541181,4.29973046 C22.5266511,4.03773585 23.0266295,3.9115903 23.6638569,3.9115903 Z M24.9383117,6.58975741 L23.7716954,6.59946092 C22.6344896,6.59946092 22.0658867,6.98760108 22.0658867,7.74447439 C22.0658867,7.98706199 22.1541181,8.19083558 22.3403846,8.34609164 C22.5266511,8.4916442 22.7815421,8.56927224 23.114861,8.56927224 C23.6246429,8.56927224 24.0559969,8.41401617 24.4187263,8.10350404 C24.7618487,7.79299191 24.9383117,7.43396226 24.9383117,7.02641509 L24.9383117,6.58975741 Z" fill="#FFFFFF"></path></g></svg></span><a href="https://www.jianshu.com/sign_in" target="_blank" class="_2MpoKb _1OyPqC _1AT95S _2WY0RL" role="button" tabindex="-1"><span>登录</span></a><a href="https://www.jianshu.com/sign_up" target="_blank" class="_2MpoKb _1OyPqC _3Mi9q9 _2WY0RL" role="button" tabindex="-1"><span>注册</span></a><a href="https://www.jianshu.com/writer" target="_blank" class="_1OyPqC _3Mi9q9 _2WY0RL _1YbC5u" role="button" tabindex="-1"><i aria-label="ic-write" style="margin-right:2px" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#ic-write"></use></svg></i><span>写文章</span></a></div><div class="_1YyUun"><div class="_2RZATq"><nav class="_3JYrtj"><a class="hM7XFL _1OhGeD" href="https://www.jianshu.com/">首页</a><a class="hM7XFL _1OhGeD" href="https://www.jianshu.com/apps?utm_medium=desktop&amp;utm_source=navbar-apps">下载APP</a><a class="hM7XFL _1OhGeD" href="https://www.jianshu.com/techareas">IT技术</a></nav><div class="MoRCpo"><div class="_31TNvD"><input type="search" class="_2q13cl G1b3UE" placeholder="搜索" aria-label="搜索专题"><span class="x6-7Eb" role="button" tabindex="-1" aria-label="搜索"><i aria-label="icon: search" class="anticon anticon-search"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0 0 11.6 0l43.6-43.5a8.2 8.2 0 0 0 0-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></i></span></div></div><div class="_1F7CTF" role="button" tabindex="0"><div class="_1o4qyK">抽奖</div><img class="_1YyGPQ" src="" alt="reward"></div></div></div></div><div class="_3t3lfz"><div class="FTZkZo"><div class="_16zCst"><h1 class="_2zeTMs" title="gsoap使用笔记">gsoap使用笔记</h1></div><div class="_26qd_C"><a class="qzhJKO" href="https://www.jianshu.com/u/eb6f438347b8"><img class="_2JlnTn" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/2-9636b13945b9ccf345bc98d0d81074eb.jpg" alt=""><span class="_22gUMi">menglj</span></a><button data-locale="zh-CN" type="button" class="_1OyPqC _3Mi9q9"><span>关注</span></button><button type="button" class="_1OyPqC _3Mi9q9 _1YbC5u"><span>赞赏支持</span></button></div></div></div></div><div class="VYwngI"></div></header><div class="_21bLU4 _3kbg6I"><div class="_3VRLsv" role="main"><div class="_gp-ck"><section class="ouvJEz"><h1 class="_1RuRku">gsoap使用笔记</h1><div class="rEsl9f"><div class="_2mYfmT"><a class="_1qp91i _1OhGeD" href="https://www.jianshu.com/u/eb6f438347b8" target="_blank" rel="noopener noreferrer"><img class="_13D2Eh" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/2-9636b13945b9ccf345bc98d0d81074eb.jpg" alt=""></a><div style="margin-left: 8px;"><div class="_3U4Smb"><span class="FxYr8x"><a class="_1OhGeD" href="https://www.jianshu.com/u/eb6f438347b8" target="_blank" rel="noopener noreferrer">menglj</a></span><button data-locale="zh-CN" type="button" class="_3kba3h _1OyPqC _3Mi9q9 _34692-"><span>关注</span></button></div><div class="s-dsoj"><time datetime="2016-06-30T05:45:39.000Z">2016.06.30 13:45:39</time><span>字数 1,142</span><span>阅读 6,533</span></div></div></div></div><article class="_2rhmJa"><h1>gsoap入门</h1>
<h2>1 使用gsoap搭建web service</h2>
<p>参考了参考文档[2]中的介绍，有一点点修改。</p>
<h3>1.1 编译calc客户端</h3>
<ol>
<li>根据<code>wsdl</code>文件生成gsoap用的头文件</li>
</ol>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-cpp"><code class="  language-cpp">wsdl2h <span class="token operator">-</span>o calc<span class="token punctuation">.</span>h http<span class="token operator">:</span><span class="token operator">/</span><span class="token operator">/</span>www<span class="token punctuation">.</span>genivia<span class="token punctuation">.</span>com<span class="token operator">/</span>calc<span class="token punctuation">.</span>wsdl
<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<ol start="2">
<li>如果用我们自己搭建的webserver，需要修改头文件中的如下代码，<br>
把port字段修改为自己的webservice的url。</li>
</ol>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-ruby"><code class="  language-ruby"><span class="token operator">/</span><span class="token operator">/</span>gsoap ns2  service port<span class="token punctuation">:</span>      http<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>websrv<span class="token punctuation">.</span>cs<span class="token punctuation">.</span>fsu<span class="token punctuation">.</span>edu<span class="token operator">/</span><span class="token operator">~</span>engelen<span class="token operator">/</span>calcserver<span class="token punctuation">.</span>cgi
<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<p>改为</p>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-ruby"><code class="  language-ruby"><span class="token operator">/</span><span class="token operator">/</span>gsoap ns2  service port<span class="token punctuation">:</span>      http<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>localhost<span class="token punctuation">:</span><span class="token number">9999</span><span class="token operator">/</span>cgi<span class="token operator">-</span>bin<span class="token operator">/</span>calcserver<span class="token punctuation">.</span>cgi
<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<ol start="3">
<li>生成client proxy类的源代码</li>
</ol>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-swift"><code class="  language-swift">soapcpp2 <span class="token operator">-</span>j <span class="token operator">-</span><span class="token constant">CL</span> <span class="token operator">-</span>I<span class="token operator">/</span>usr<span class="token operator">/</span>share<span class="token operator">/</span>gsoap<span class="token operator">/</span><span class="token keyword">import</span> calc<span class="token punctuation">.</span>h
<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<p><code>-j</code>生成C++ proxy类，供client调用，<code>-CL</code>生成客户端程序，<code>-I</code>指明gsoap相关头文件路径，这个根据gsoap安装位置而定，例子中的路径是ubuntu通过<code>apt-get</code>安装的gsoap的路径。</p>
<ol start="4">
<li>编写client程序<code>calcclient.cpp</code>
</li>
</ol>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-cpp"><code class="cpp  language-cpp"><span class="token macro property">#<span class="token directive keyword">include</span> <span class="token string">"calc.nsmap"</span>      </span><span class="token comment">// XML namespace mapping table (only needed once at the global level)</span>
<span class="token macro property">#<span class="token directive keyword">include</span> <span class="token string">"soapcalcProxy.h"</span> </span><span class="token comment">// the proxy class, also #includes "soapH.h" and "soapStub.h"</span>
<span class="token keyword">int</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>
  calcProxy calc<span class="token punctuation">;</span>
  <span class="token keyword">double</span> sum<span class="token punctuation">;</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>calc<span class="token punctuation">.</span><span class="token function">add</span><span class="token punctuation">(</span><span class="token number">1.23</span><span class="token punctuation">,</span> <span class="token number">4.56</span><span class="token punctuation">,</span> sum<span class="token punctuation">)</span> <span class="token operator">==</span> SOAP_OK<span class="token punctuation">)</span>
    std<span class="token operator">::</span>cout <span class="token operator">&lt;&lt;</span> <span class="token string">"Sum = "</span> <span class="token operator">&lt;&lt;</span> sum <span class="token operator">&lt;&lt;</span> std<span class="token operator">::</span>endl<span class="token punctuation">;</span>
  <span class="token keyword">else</span>
    calc<span class="token punctuation">.</span><span class="token function">soap_stream_fault</span><span class="token punctuation">(</span>std<span class="token operator">::</span>cerr<span class="token punctuation">)</span><span class="token punctuation">;</span>
  calc<span class="token punctuation">.</span><span class="token function">destroy</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">// same as: soap_destroy(calc.soap);</span>
  <span class="token function">soap_end</span><span class="token punctuation">(</span>calc<span class="token punctuation">.</span>soap<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre></div>
<p>调用proxy类<code>calcProxy</code> 的 <code>add</code>方法，传递了2个参数<code>1.23</code> <code>4.56</code>，打印结果。</p>
<ol start="5">
<li>编译</li>
</ol>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-css"><code class="  language-css">c++ -o calcclient calcclient.cpp soapC.cpp soapcalcProxy.cpp -lgsoap++
<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<p>如果第二步没修改port的话，这时候执行<code>calcclient</code>就能得到结果了，如果修改了port，我们需要自己搭建一个webservice来提供calc服务。</p>
<h3>1.2 搭建服务器</h3>
<h4>1.2.1 编译服务器端程序</h4>
<ol>
<li>与client第一步一样，生成<code>calc.h</code>
</li>
</ol>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-cpp"><code class="  language-cpp">wsdl2h <span class="token operator">-</span>o calc<span class="token punctuation">.</span>h http<span class="token operator">:</span><span class="token operator">/</span><span class="token operator">/</span>www<span class="token punctuation">.</span>genivia<span class="token punctuation">.</span>com<span class="token operator">/</span>calc<span class="token punctuation">.</span>wsdl
<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<ol start="2">
<li>生成server端的接口类</li>
</ol>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-swift"><code class="  language-swift">soapcpp2 <span class="token operator">-</span>j <span class="token operator">-</span><span class="token constant">SL</span> <span class="token operator">-</span>I<span class="token operator">/</span>usr<span class="token operator">/</span>share<span class="token operator">/</span>gsoap<span class="token operator">/</span><span class="token keyword">import</span> calc<span class="token punctuation">.</span>h
<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<ol start="3">
<li>编写cgi程序<code>calcserver.cpp</code>，实现calc服务器端的接口</li>
</ol>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-cpp"><code class="cpp  language-cpp"><span class="token macro property">#<span class="token directive keyword">include</span> <span class="token string">"calc.nsmap"</span>        </span><span class="token comment">// XML namespace mapping table (only needed once at the global level)</span>
<span class="token macro property">#<span class="token directive keyword">include</span> <span class="token string">"soapcalcService.h"</span> </span><span class="token comment">// the service class, also #includes "soapH.h" and "soapStub.h"</span>
<span class="token keyword">int</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>
  calcService <span class="token function">calc</span><span class="token punctuation">(</span>SOAP_XML_INDENT<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>calc<span class="token punctuation">.</span><span class="token function">serve</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">!=</span> SOAP_OK<span class="token punctuation">)</span>
    calc<span class="token punctuation">.</span><span class="token function">soap_stream_fault</span><span class="token punctuation">(</span>std<span class="token operator">::</span>cerr<span class="token punctuation">)</span><span class="token punctuation">;</span>
  calc<span class="token punctuation">.</span><span class="token function">destroy</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">// same as: soap_destroy(calc.soap);</span>
  <span class="token function">soap_end</span><span class="token punctuation">(</span>calc<span class="token punctuation">.</span>soap<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">int</span> calcService<span class="token operator">::</span><span class="token function">add</span><span class="token punctuation">(</span><span class="token keyword">double</span> a<span class="token punctuation">,</span> <span class="token keyword">double</span> b<span class="token punctuation">,</span> <span class="token keyword">double</span> <span class="token operator">&amp;</span>result<span class="token punctuation">)</span>
<span class="token punctuation">{</span>
  result <span class="token operator">=</span> a <span class="token operator">+</span> b<span class="token punctuation">;</span>
  <span class="token keyword">return</span> SOAP_OK<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">int</span> calcService<span class="token operator">::</span><span class="token function">sub</span><span class="token punctuation">(</span><span class="token keyword">double</span> a<span class="token punctuation">,</span> <span class="token keyword">double</span> b<span class="token punctuation">,</span> <span class="token keyword">double</span> <span class="token operator">&amp;</span>result<span class="token punctuation">)</span>
<span class="token punctuation">{</span>
  result <span class="token operator">=</span> a <span class="token operator">-</span> b<span class="token punctuation">;</span>
  <span class="token keyword">return</span> SOAP_OK<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">int</span> calcService<span class="token operator">::</span><span class="token function">mul</span><span class="token punctuation">(</span><span class="token keyword">double</span> a<span class="token punctuation">,</span> <span class="token keyword">double</span> b<span class="token punctuation">,</span> <span class="token keyword">double</span> <span class="token operator">&amp;</span>result<span class="token punctuation">)</span>
<span class="token punctuation">{</span>
  result <span class="token operator">=</span> a <span class="token operator">*</span> b<span class="token punctuation">;</span>
  <span class="token keyword">return</span> SOAP_OK<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">int</span> calcService<span class="token operator">::</span><span class="token function">div</span><span class="token punctuation">(</span><span class="token keyword">double</span> a<span class="token punctuation">,</span> <span class="token keyword">double</span> b<span class="token punctuation">,</span> <span class="token keyword">double</span> <span class="token operator">&amp;</span>result<span class="token punctuation">)</span>
<span class="token punctuation">{</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>b <span class="token operator">==</span> <span class="token number">0.0</span><span class="token punctuation">)</span>
  <span class="token punctuation">{</span>
    <span class="token keyword">char</span> <span class="token operator">*</span>msg <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token keyword">char</span><span class="token operator">*</span><span class="token punctuation">)</span><span class="token function">soap_malloc</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token operator">-&gt;</span>soap<span class="token punctuation">,</span> <span class="token number">1024</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">snprintf</span><span class="token punctuation">(</span>msg<span class="token punctuation">,</span> <span class="token number">1024</span><span class="token punctuation">,</span> <span class="token string">"Trying to divide %f by zero"</span><span class="token punctuation">,</span> a<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span> <span class="token keyword">this</span><span class="token operator">-&gt;</span><span class="token function">soap_senderfault</span><span class="token punctuation">(</span>msg<span class="token punctuation">,</span> <span class="token constant">NULL</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
  result <span class="token operator">=</span> a <span class="token operator">/</span> b<span class="token punctuation">;</span>
  <span class="token keyword">return</span> SOAP_OK<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">int</span> calcService<span class="token operator">::</span><span class="token function">pow</span><span class="token punctuation">(</span><span class="token keyword">double</span> a<span class="token punctuation">,</span> <span class="token keyword">double</span> b<span class="token punctuation">,</span> <span class="token keyword">double</span> <span class="token operator">&amp;</span>result<span class="token punctuation">)</span>
<span class="token punctuation">{</span>
  result <span class="token operator">=</span> <span class="token operator">::</span><span class="token function">pow</span><span class="token punctuation">(</span>a<span class="token punctuation">,</span> b<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token comment">// soap_errno is like errno, but compatible with Win32</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>soap_errno <span class="token operator">==</span> EDOM<span class="token punctuation">)</span>
  <span class="token punctuation">{</span>
    <span class="token keyword">char</span> <span class="token operator">*</span>msg <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token keyword">char</span><span class="token operator">*</span><span class="token punctuation">)</span><span class="token function">soap_malloc</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token operator">-&gt;</span>soap<span class="token punctuation">,</span> <span class="token number">1024</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token function">snprintf</span><span class="token punctuation">(</span>msg<span class="token punctuation">,</span> <span class="token number">1024</span><span class="token punctuation">,</span> <span class="token string">"&lt;error xmlns=\"http://tempuri.org/\"&gt;Can't take power of %f to %f&lt;/error&gt;"</span><span class="token punctuation">,</span> a<span class="token punctuation">,</span> b<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span> <span class="token keyword">this</span><span class="token operator">-&gt;</span><span class="token function">soap_senderfault</span><span class="token punctuation">(</span><span class="token string">"Power function domain error"</span><span class="token punctuation">,</span> msg<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
  <span class="token keyword">return</span> SOAP_OK<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre></div>
<ol start="4">
<li>编译，测试</li>
</ol>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-csharp"><code class="  language-csharp">c<span class="token operator">++</span> <span class="token operator">-</span>o calcserver calcserver<span class="token punctuation">.</span>cpp soapC<span class="token punctuation">.</span>cpp soapcalcService<span class="token punctuation">.</span>cpp <span class="token operator">-</span>lgsoap<span class="token operator">++</span>
<span class="token punctuation">.</span><span class="token operator">/</span>calcserver <span class="token operator">&lt;</span> calc<span class="token punctuation">.</span><span class="token keyword">add</span><span class="token punctuation">.</span>req<span class="token punctuation">.</span>xml
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre></div>
<p>这时候<code>calcserver</code>是一个cgi程序，从标准输入读取soap命令，输出到标准输出上。接下来搭建一个webserver来提供cgi服务。</p>
<h4>1.2.2 搭建cgi服务器</h4>
<p>简单起见，使用docker启动一个apache来作为web server。</p>
<ol>
<li>下载apache镜像</li>
</ol>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-css"><code class="  language-css">docker pull <span class="token property">httpd</span><span class="token punctuation">:</span>2.4
<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<ol start="2">
<li>修改<code>http.conf</code>文件，启动apache对cgi的支持。<br>
取得http.conf文件，修改其中的cgi支持，打开下面内容的注释即可</li>
</ol>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-undefined"><code class="  language-undefined">LoadModule cgi_module modules/mod_cgi.so
<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<ul>
<li>http.conf在docker container的路径为：<code>/usr/local/apache2/conf/httpd.conf</code>
</li>
<li>这步不做的话，运行client的时候，会提示如下错误，即apache把cgi请求当成了下载文件的请求。</li>
</ul>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-css"><code class="  language-css">Error 200 <span class="token property">fault</span><span class="token punctuation">:</span> <span class="token property">SOAP-ENV</span><span class="token punctuation">:</span>Client[no subcode]
<span class="token string">"Error 200"</span>
<span class="token property">Detail</span><span class="token punctuation">:</span> [no detail]
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre></div>
<ol start="3">
<li>启动服务,在<code>calcserver</code>和<code>http.conf</code>所在目录输入如下命令:</li>
</ol>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-ruby"><code class="  language-ruby">docker run <span class="token operator">-</span>it <span class="token operator">--</span>rm <span class="token operator">--</span>name my<span class="token operator">-</span>apache<span class="token operator">-</span>app <span class="token operator">-</span>p <span class="token number">9999</span><span class="token punctuation">:</span><span class="token number">80</span> <span class="token operator">-</span>v <span class="token string">"$PWD"</span><span class="token punctuation">:</span><span class="token operator">/</span>usr<span class="token operator">/</span>local<span class="token operator">/</span>apache2<span class="token operator">/</span>cgi<span class="token operator">-</span>bin <span class="token operator">-</span>v <span class="token string">"$PWD"</span><span class="token operator">/</span>http<span class="token punctuation">.</span>conf<span class="token punctuation">:</span><span class="token operator">/</span>usr<span class="token operator">/</span>local<span class="token operator">/</span>apache2<span class="token operator">/</span>conf<span class="token operator">/</span>httpd<span class="token punctuation">.</span>conf <span class="token operator">-</span>v <span class="token operator">/</span>usr<span class="token operator">/</span>lib<span class="token operator">/</span>x86_64<span class="token operator">-</span>linux<span class="token operator">-</span>gnu<span class="token operator">/</span>libgsoap<span class="token operator">++</span><span class="token punctuation">.</span>so<span class="token punctuation">.</span><span class="token number">4</span><span class="token punctuation">:</span><span class="token operator">/</span>usr<span class="token operator">/</span>lib<span class="token operator">/</span>x86_64<span class="token operator">-</span>linux<span class="token operator">-</span>gnu<span class="token operator">/</span>libgsoap<span class="token operator">++</span><span class="token punctuation">.</span>so<span class="token punctuation">.</span><span class="token number">4</span> httpd<span class="token punctuation">:</span><span class="token number">2.4</span>
<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<h3>1.3 其他</h3>
<h4>1.3.1 问题</h4>
<p>gsoap也支持自己作为web服务器提供服务，只需要修改server代码，即可，但我没有试验成功。</p>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-cpp"><code class="  language-cpp"><span class="token keyword">int</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>
  calcService <span class="token function">calc</span><span class="token punctuation">(</span>SOAP_XML_INDENT<span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token comment">//if (calc.serve() != SOAP_OK) &lt;--这里改为调用run</span>
  <span class="token keyword">if</span> <span class="token punctuation">(</span>calc<span class="token punctuation">.</span><span class="token function">run</span><span class="token punctuation">(</span><span class="token number">9999</span><span class="token punctuation">)</span> <span class="token operator">!=</span> SOAP_OK<span class="token punctuation">)</span>
    calc<span class="token punctuation">.</span><span class="token function">soap_stream_fault</span><span class="token punctuation">(</span>std<span class="token operator">::</span>cerr<span class="token punctuation">)</span><span class="token punctuation">;</span>
  calc<span class="token punctuation">.</span><span class="token function">destroy</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">// same as: soap_destroy(calc.soap);</span>
  <span class="token function">soap_end</span><span class="token punctuation">(</span>calc<span class="token punctuation">.</span>soap<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre></div>
<p>这时运行服务器程序时始终提示：</p>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-bash"><code class="  language-bash">setsockopt unset IPV6_V6ONLY failed in soap_bind()
<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<h4>1.3.2 curl调试webservice服务器</h4>
<p>可以使用<code>curl</code>模拟客户端请求一个soap服务[4]，命令如下：</p>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-kotlin"><code class="  language-kotlin">curl <span class="token operator">-</span>v <span class="token operator">--</span>header <span class="token string">"content-type: application/soap+xml"</span>  <span class="token operator">--</span><span class="token keyword">data</span> <span class="token label symbol">@calc</span><span class="token punctuation">.</span>add<span class="token punctuation">.</span>req<span class="token punctuation">.</span>xml localhost<span class="token operator">:</span><span class="token number">9999</span><span class="token operator">/</span>cgi<span class="token operator">-</span>bin<span class="token operator">/</span>calcserver<span class="token punctuation">.</span>cgi
<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<h2>2 编译arm-linux版本的gsoap</h2>
<h3>2.1 下载gsoap源码</h3>
<p><a href="https://link.jianshu.com/?t=http://liquidtelecom.dl.sourceforge.net/project/gsoap2/gSOAP/gsoap_2.8.33.zip" target="_blank" rel="nofollow">http://liquidtelecom.dl.sourceforge.net/project/gsoap2/gSOAP/gsoap_2.8.33.zip</a></p>
<h3>2.2 配置编译环境</h3>
<ol>
<li>下载linaro toolchain，解压到目录<code>/usr/local/linaro-multilib-2014.06-gcc4.9</code>
</li>
<li>设置<code>PATH</code>环境变量。<code>export PATH=/usr/local/linaro-multilib-2014.06-gcc4.9:$PATH</code>
</li>
</ol>
<h3>2.3 config&amp;make</h3>
<h4>2.3.1 生成makefile</h4>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-bash"><code class="bash  language-bash">gsoap-2.8$ ./configure --host=arm-linux-gnueabihf --prefix=/usr/local/arm-linux
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-linux-gnueabihf-strip... arm-linux-gnueabihf-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-unknown-linux-gnueabihf
checking whether make sets $(MAKE)... (cached) yes
checking for arm-linux-gnueabihf-g++... arm-linux-gnueabihf-g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
...
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre></div>
<ul>
<li>
<code>--host=arm-linux-gnueabihf</code> - 表明编译的库是运行在<code>arm linux</code>上，这个也是gcc编译器的前缀。</li>
<li>
<code>--prefix=/usr/local/arm-linux</code> - 表明变编译好的库的安装路径</li>
</ul>
<h4>2.3.2 手动生成wsdl.h文件</h4>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-bash"><code class="bash  language-bash">gsoap-2.8$ cd gsoap/wsdl
gsoap-2.8/gsoap/wsdl$ ../../target-amd64/bin/soapcpp2 -SC -pwsdl -I. -I../../gsoap/import ./wsdl.h

**  The gSOAP code generator for C and C++, soapcpp2 release 2.8.33
**  Copyright (C) 2000-2016, Robert van Engelen, Genivia Inc.
**  All Rights Reserved. This product is provided "as is", without any warranty.
**  The soapcpp2 tool and its generated software are released under the GPL.
**  ----------------------------------------------------------------------------
**  A commercial use license is available from Genivia Inc., contact@genivia.com
**  ----------------------------------------------------------------------------

soapcpp2: using both options -C and -S omits client/server code
Saving wsdlStub.h annotated copy of the source interface file
Saving wsdlH.h serialization functions to #include in projects
Saving xmime.nsmap namespace mapping table
Saving wsdlC.cpp serialization functions

Compilation successful 
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre></div>
<p><strong><code>../../target-amd64/bin/soapcpp2</code>这个是你的host机器可以运行的soapcpp2</strong><br><br>
如果不做这步，在编译过程中会提示如下错误，因为编译时，生成的soapcpp2是只能在arm linux上运行的。</p>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-swift"><code class="  language-swift">make<span class="token punctuation">[</span><span class="token number">4</span><span class="token punctuation">]</span><span class="token punctuation">:</span> <span class="token builtin">Entering</span> directory `<span class="token operator">/</span>home<span class="token operator">/</span>meng<span class="token operator">/</span>git<span class="token operator">/</span>gsoap<span class="token operator">-</span><span class="token number">2.8</span><span class="token operator">/</span>gsoap<span class="token operator">/</span>wsdl'
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token operator">/</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token operator">/</span>gsoap<span class="token operator">/</span>src<span class="token operator">/</span>soapcpp2 <span class="token operator">-</span><span class="token constant">SC</span> <span class="token operator">-</span>pwsdl <span class="token operator">-</span>I<span class="token punctuation">.</span> <span class="token operator">-</span>I<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token operator">/</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token operator">/</span>gsoap<span class="token operator">/</span><span class="token keyword">import</span> <span class="token punctuation">.</span><span class="token operator">/</span>wsdl<span class="token punctuation">.</span>h
<span class="token operator">/</span>bin<span class="token operator">/</span>bash<span class="token punctuation">:</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token operator">/</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token operator">/</span>gsoap<span class="token operator">/</span>src<span class="token operator">/</span>soapcpp2<span class="token punctuation">:</span> cannot execute binary file<span class="token punctuation">:</span> <span class="token builtin">Exec</span> format error
make<span class="token punctuation">[</span><span class="token number">4</span><span class="token punctuation">]</span><span class="token punctuation">:</span> <span class="token operator">*</span><span class="token operator">*</span><span class="token operator">*</span> <span class="token punctuation">[</span>wsdlC<span class="token punctuation">.</span>cpp<span class="token punctuation">]</span> <span class="token builtin">Error</span> <span class="token number">126</span>

<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre></div>
<h4>2.3.3 修改代码</h4>
<p>修改<code>config.h</code>文件，删除最后一行的<code>#define malloc rpl_malloc</code><br>
否则编译会出错<br>
`</p>
<h4>2.3.4 修改makefile</h4>
<p>修改<code>gsoap/wsdl</code>目录下的<code>Makefile</code>，删除下面2行（因为wsdl2h对其他库有依赖，并且我们也不需要arm版本的wsdl2h程序）：</p>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-makefile"><code class="makefile  language-makefile">wsdl2h$(EXEEXT): $(wsdl2h_OBJECTS) $(wsdl2h_DEPENDENCIES) $(EXTRA_wsdl2h_DEPENDENCIES) 
    #@rm -f wsdl2h$(EXEEXT)
    #$(AM_V_CXXLD)$(wsdl2h_LINK) $(wsdl2h_OBJECTS) $(wsdl2h_LDADD) $(LIBS)
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre></div>
<h4>2.3.5 编译，安装</h4>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-bash"><code class="bash  language-bash">gsoap-2.8$ make
gsoap-2.8$ make install
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre></div>
<p>在目录<code>/usr/local/arm-linux</code>下是编译好的gsoap库，注：我们没有编译出来arm linux版本的<code>wadl2h</code>。</p>
<h3>2.4 编译arm-linux版calcserver.cgi</h3>
<ul>
<li>编译cgi版本的calcserver.cgi</li>
</ul>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-bash"><code class="bash  language-bash">calcserver$ arm-linux-gnueabihf-g++ -o calcserver.cgi calcserver.cpp soapC.cpp soapcalcService.cpp -lgsoap++ -DWITH_FASTCGI -L/usr/local/arm-linux/lib -I/usr/local/arm-linux/include
<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<ul>
<li>编译支持fastcgi版本的calcserver.cgi[5]</li>
</ul>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-bash"><code class="bash  language-bash">calcserver$ arm-linux-gnueabihf-g++ -o calcserver.cgi calcserver.cpp soapC.cpp soapcalcService.cpp /gsoap-source-path/gsoap/stdsoap2.cpp -DWITH_FASTCGI  -I/usr/local/arm-linux/include -I/fcgi-lib-path/fcgi/include -L/fcgi-lib-path/fcgi/usr/lib -lfcgi
<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div>
<ul>
<li>
<code>fcgi-lib-path</code> - 这个指向arm linux版的fcgi库</li>
<li>
<code>gsoap-source-path</code> - 这个指向gsoap的源码路径`</li>
<li>我们编译<code>stdsoap2.cpp</code>这个文件，而不去链接<code>libsoap++.a</code>
</li>
<li>定义<code>WITH_FASTCGI</code>宏</li>
</ul>
<h3>2.5 配置lighttpd</h3>
<p>如果编译的是cgi版本，直接把编译好的calcserver.cgi放到<code>cig-bin</code>目录下即可。<br><br>
如果是fastcgi版本，需要修改lighttpd配置文件，增加如下内容（前提lighttpd已经配置好支持fastcgi了）：</p>
<div class="_2Uzcx_"><button class="VJbwyy" type="button" aria-label="复制代码"><i aria-label="icon: copy" class="anticon anticon-copy"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button><pre class="line-numbers  language-dart"><code class="  language-dart">fastcgi<span class="token punctuation">.</span>server <span class="token operator">=</span> <span class="token punctuation">(</span>
  <span class="token string">"calcserver.cgi"</span> <span class="token operator">=</span><span class="token operator">&gt;</span>
  <span class="token punctuation">(</span><span class="token punctuation">(</span> <span class="token string">"socket"</span> <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token string">"/tmp/fcgi.socket"</span><span class="token punctuation">,</span>
     <span class="token string">"check-local"</span> <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token string">"disable"</span><span class="token punctuation">,</span>
     <span class="token string">"bin-path"</span> <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token string">"/webSvr/web/cgi-bin/calcserver.cgi"</span><span class="token punctuation">,</span>
     <span class="token string">"max-procs"</span> <span class="token operator">=</span><span class="token operator">&gt;</span> <span class="token number">1</span><span class="token punctuation">,</span>
  <span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token punctuation">)</span>
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre></div>
<h2>3 参考文档</h2>
<ol>
<li><a href="https://link.jianshu.com/?t=http://httpd.apache.org/docs/current/howto/cgi.html" target="_blank" rel="nofollow">Apache Tutorial: Dynamic Content with CGI</a></li>
<li><a href="https://link.jianshu.com/?t=http://www.genivia.com/dev.html" target="_blank" rel="nofollow">Getting Started with gSOAP</a></li>
<li><a href="https://link.jianshu.com/?t=http://stackoverflow.com/questions/26002589/gsoap-missing-stdsoap2-cpp-undefined-reference-to-soap-peek-element" target="_blank" rel="nofollow">gSoap missing stdsoap2.cpp, undefined reference to `soap_peek_element'</a></li>
<li><a href="https://link.jianshu.com/?t=http://www.programgo.com/article/51462984174/" target="_blank" rel="nofollow">Curl实现web serivce调试调用</a></li>
<li><a href="https://link.jianshu.com/?t=http://www.genivia.com/doc/soapdoc2.html#tth_sEc19.32" target="_blank" rel="nofollow">19.32  FastCGI Support - genivia.com</a></li>
<li><a href="https://link.jianshu.com/?t=http://blog.csdn.net/u012084827/article/details/12202133" target="_blank" rel="nofollow">linux设备上的Onvif 实现4：成功编译gsoap 2.8.15 - blog.csdn</a></li>
</ol>
</article><div></div><div class="_1kCBjS"><div class="_18vaTa"><div class="_3BUZPB"><div class="_2Bo4Th" role="button" tabindex="-1" aria-label="给文章点赞"><i aria-label="ic-like" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#ic-like"></use></svg></i></div><span class="_1LOh_5" role="button" tabindex="-1" aria-label="查看点赞列表">3人点赞<i aria-label="icon: right" class="anticon anticon-right"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"></path></svg></i></span></div><div class="_3BUZPB"><div class="_2Bo4Th" role="button" tabindex="-1"><i aria-label="ic-dislike" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#ic-dislike"></use></svg></i></div></div></div><div class="_18vaTa"><a class="_3BUZPB _1x1ok9 _1OhGeD" href="https://www.jianshu.com/nb/229611" target="_blank" rel="noopener noreferrer"><i aria-label="ic-notebook" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#ic-notebook"></use></svg></i><span>随笔</span></a><div class="_3BUZPB ant-dropdown-trigger"><div class="_2Bo4Th"><i aria-label="ic-others" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#ic-others"></use></svg></i></div></div></div></div><div class="_19DgIp" style="margin-top:24px;margin-bottom:24px"></div><div class="_13lIbp"><div class="_16AzcO">更多精彩内容，就在简书APP</div><div class="_6S_NkV"><canvas style="height: 110px; width: 110px;" width="110" height="110"></canvas><img src="" style="display: none;"></div><div class="l8ZVfE"></div><div class="_191KSt">"小礼物走一走，来简书关注我"</div><button type="button" class="_1OyPqC _3Mi9q9 _2WY0RL _1YbC5u"><span>赞赏支持</span></button><span class="_3zdmIj">还没有人赞赏，支持一下</span></div><div class="d0hShY"><a class="_1bPVBH _1OhGeD" href="https://www.jianshu.com/u/eb6f438347b8" target="_blank" rel="noopener noreferrer"><img class="_27NmgV" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/2-9636b13945b9ccf345bc98d0d81074eb.jpg" alt="  "></a><div class="Uz-vZq"><div class="Cqpr1X"><a class="HC3FFO _1OhGeD" href="https://www.jianshu.com/u/eb6f438347b8" title="menglj" target="_blank" rel="noopener noreferrer">menglj</a><span class="_2WEj6j" title=""></span></div><div class="lJvI3S"><span>总资产1</span><span>共写了1.2W字</span><span>获得54个赞</span><span>共18个粉丝</span></div></div><button data-locale="zh-CN" type="button" class="_1OyPqC _3Mi9q9"><span>关注</span></button></div></section><section class="-umr26" aria-label="baidu-ad"><div id="_u6558800_w3fz7ls8e8k"></div><div><div style="padding-top:0px;"><div id="apkel" style="padding-top:0px;"><div id="gobwwaaaeh"><iframe scrolling="no" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/s.html" width="680" height="180" frameborder="0"></iframe></div></div></div></div><script type="text/javascript" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/l.js" async="" defer="defer"></script></section><div id="note-page-comment"><div class="lazyload-placeholder"></div></div><section class="ouvJEz"><h3 class="QxT4hD"><span>被以下专题收入，发现更多相似内容</span></h3><div class="_2Nttfz"><a class="_3s5t0Q _1OhGeD" href="https://www.jianshu.com/c/7d1408874d5c" target="_blank" rel="noopener noreferrer"><img class="_2vEwGY" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/timg.jpg" alt=""><span class="_2-Djqu">linux深入</span></a><a class="_3s5t0Q _1OhGeD" href="https://www.jianshu.com/c/b75094e6d564" target="_blank" rel="noopener noreferrer"><img class="_2vEwGY" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/Opera-Background-Space-Harmonica.jpg" alt=""><span class="_2-Djqu">软件</span></a></div><div class="_19DgIp" style="margin-top: 32px; margin-bottom: 32px;"></div><h3 class="QxT4hD"><span>推荐阅读</span><a class="_29KFEa _1OhGeD" href="https://www.jianshu.com/" target="_blank" rel="noopener noreferrer">更多精彩内容<i aria-label="ic-right" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#ic-right"></use></svg></i></a></h3><ul class="_1iTR78"><li class="_11jppn"><div class="JB6qEE"><div class="em6wEs" title="Nginx与php工作原理" role="heading" aria-level="4"><a class="_2voXH8 _1OhGeD" href="https://www.jianshu.com/p/d0b858ed5030" target="_blank" rel="noopener noreferrer">Nginx与php工作原理</a></div><div class="_3fvgn4">1. Nginx的模块与工作原理 Nginx由内核和模块组成，其中，内核的设计非常微小和简洁，完成的工作也非常简单...</div><div class="_1pJt6F"><a class="_3IWz1q _1OhGeD" href="https://www.jianshu.com/u/ba8c3ff5a775" target="_blank" rel="noopener noreferrer"><img class="_34VC_H" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/fd6cb25644ba.jpg" alt=""><span class="_3tPsL6">rosekissyou</span></a><span class="_31hjBO">阅读<!-- --> <!-- -->8,960</span><span class="_31hjBO">评论<!-- --> <!-- -->5</span><span class="_31hjBO">赞<!-- --> <!-- -->125</span></div></div><a class="_10MMAm _1OhGeD" href="https://www.jianshu.com/p/d0b858ed5030" target="_blank" rel="noopener noreferrer"><img class="_3zGDUj" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/1910094-490e02bba0040ce7.png" alt=""></a></li><li class="_11jppn"><div class="JB6qEE"><div class="em6wEs" title="C++ 教程 | 菜鸟教程" role="heading" aria-level="4"><a class="_2voXH8 _1OhGeD" href="https://www.jianshu.com/p/9daf663b8c52" target="_blank" rel="noopener noreferrer">C++ 教程 | 菜鸟教程</a></div><div class="_3fvgn4">重新系统学习下C++；但是还是少了好多知识点；socket；unix；stl；boost等； C++ 教程 | 菜...</div><div class="_1pJt6F"><a class="_3IWz1q _1OhGeD" href="https://www.jianshu.com/u/3f0075454d65" target="_blank" rel="noopener noreferrer"><img class="_34VC_H" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/664ab8e4-2ede-470e-b3b9-cd5463b0260d.png" alt=""><span class="_3tPsL6">kakukeme</span></a><span class="_31hjBO">阅读<!-- --> <!-- -->14,673</span><span class="_31hjBO">评论<!-- --> <!-- -->0</span><span class="_31hjBO">赞<!-- --> <!-- -->52</span></div></div></li><section class="-umr26" aria-label="baidu-ad"><div id="_ardc8q5llwu"></div><div><div style="display:none;margin-left:0px;"></div><iframe scrolling="no" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/s_002.html" width="680" height="180" frameborder="0"></iframe></div><script type="text/javascript" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/pwsp.js" async="" defer="defer"></script></section><li class="_11jppn"><div class="JB6qEE"><div class="em6wEs" title="nginx-php-mysql" role="heading" aria-level="4"><a class="_2voXH8 _1OhGeD" href="https://www.jianshu.com/p/fcb9cb3f7db0" target="_blank" rel="noopener noreferrer">nginx-php-mysql</a></div><div class="_3fvgn4">更改ip和dnsVi  /etc/sysconfig/network-scripts/ifcfg-eth0vi /...</div><div class="_1pJt6F"><a class="_3IWz1q _1OhGeD" href="https://www.jianshu.com/u/eaea1b5f3e42" target="_blank" rel="noopener noreferrer"><img class="_34VC_H" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/7-0993d41a595d6ab6ef17b19496eb2f21.jpg" alt=""><span class="_3tPsL6">Xwei_</span></a><span class="_31hjBO">阅读<!-- --> <!-- -->1,055</span><span class="_31hjBO">评论<!-- --> <!-- -->0</span><span class="_31hjBO">赞<!-- --> <!-- -->3</span></div></div></li><li class="_11jppn"><div class="JB6qEE"><div class="em6wEs" title="多余" role="heading" aria-level="4"><a class="_2voXH8 _1OhGeD" href="https://www.jianshu.com/p/61576fd4e0c5" target="_blank" rel="noopener noreferrer">多余</a></div><div class="_3fvgn4">邮筒成为衣匠 将影子剪成风衣 裹住四季 可寒风 仍从四季之外 带斜雨 浇灌灰烬 〔8712〕</div><div class="_1pJt6F"><a class="_3IWz1q _1OhGeD" href="https://www.jianshu.com/u/156151b721fd" target="_blank" rel="noopener noreferrer"><img class="_34VC_H" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/2d6d10db902c.jpg" alt=""><span class="_3tPsL6">微风LG</span></a><span class="_31hjBO">阅读<!-- --> <!-- -->158</span><span class="_31hjBO">评论<!-- --> <!-- -->9</span><span class="_31hjBO">赞<!-- --> <!-- -->2</span></div></div><a class="_10MMAm _1OhGeD" href="https://www.jianshu.com/p/61576fd4e0c5" target="_blank" rel="noopener noreferrer"><img class="_3zGDUj" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/3351123-88e4c32c49239498.jpg" alt=""></a></li><li class="_11jppn"><div class="JB6qEE"><div class="em6wEs" title="那些春日里的小确幸--手机随拍" role="heading" aria-level="4"><a class="_2voXH8 _1OhGeD" href="https://www.jianshu.com/p/2f9c4a5465f2" target="_blank" rel="noopener noreferrer">那些春日里的小确幸--手机随拍</a></div><div class="_3fvgn4">相比较连续的春日暖阳，今天的气温真的算是低的。 可是在凉凉的春风中，却有两件事，让我真切感受到了“小确幸” 十一年...</div><div class="_1pJt6F"><a class="_3IWz1q _1OhGeD" href="https://www.jianshu.com/u/b4ff39251aec" target="_blank" rel="noopener noreferrer"><img class="_34VC_H" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/12-aeeea4bedf10f2a12c0d50d626951489.jpg" alt=""><span class="_3tPsL6">心湖清清</span></a><span class="_31hjBO">阅读<!-- --> <!-- -->116</span><span class="_31hjBO">评论<!-- --> <!-- -->0</span><span class="_31hjBO">赞<!-- --> <!-- -->0</span></div></div><a class="_10MMAm _1OhGeD" href="https://www.jianshu.com/p/2f9c4a5465f2" target="_blank" rel="noopener noreferrer"><img class="_3zGDUj" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/5339455-cbd70d8134e89c4a.JPG" alt=""></a></li></ul></section></div><aside class="_2OwGUo"><section class="-umr26" aria-label="baidu-ad"><div id="_u6585162_5xoakjk50p5"></div><div><div style="padding-left:0px;"><div><abbr style="width:0px;height:0px;"></abbr><iframe scrolling="no" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/s_003.html" width="260" height="260" frameborder="0"></iframe><ins style="display:none;visibility:visible;"></ins></div></div></div><script type="text/javascript" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/ry.js" async="" defer="defer"></script></section><section class="_3Z3nHf"><div class="_3Oo-T1"><a class="_1b5rv9 _1OhGeD" href="https://www.jianshu.com/u/eb6f438347b8" target="_blank" rel="noopener noreferrer"><img class="_3T9iJQ" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/2-9636b13945b9ccf345bc98d0d81074eb.jpg" alt=""></a><div class="_32ZTTG"><div class="_2O0T_w"><div class="_2v-h3G"><span class="_2vh4fr" title="menglj"><a class="_1OhGeD" href="https://www.jianshu.com/u/eb6f438347b8" target="_blank" rel="noopener noreferrer">menglj</a></span></div><button data-locale="zh-CN" type="button" class="tzrf9N _1OyPqC _3Mi9q9 _34692-"><span>关注</span></button></div><div class="_1pXc22">总资产1</div></div></div><div class="_19DgIp"></div><div class="_26Hhi2" role="listitem"><div class="_3TNGId" title="mysqld windows下运行错误的解决办法"><a class="_2ER8Tt _1OhGeD" href="https://www.jianshu.com/p/cf22f189848c" target="_blank" rel="noopener noreferrer">mysqld windows下运行错误的解决办法</a></div><div class="DfvGP9">阅读 438</div></div><div class="_26Hhi2" role="listitem"><div class="_3TNGId" title="设置java程序的可信任证书"><a class="_2ER8Tt _1OhGeD" href="https://www.jianshu.com/p/5761095550ee" target="_blank" rel="noopener noreferrer">设置java程序的可信任证书</a></div><div class="DfvGP9">阅读 1,748</div></div></section><div><div class=""><section class="_3Z3nHf"><h3 class="QHRnq8 QxT4hD"><span>推荐阅读</span></h3><div class="cuOxAY" role="listitem"><div class="_3L5YSq" title="Maven 安装及环境配置"><a class="_1-HJSV _1OhGeD" href="https://www.jianshu.com/p/1979c54b9389" target="_blank" rel="noopener noreferrer">Maven 安装及环境配置</a></div><div class="_19haGh">阅读 129</div></div><div class="cuOxAY" role="listitem"><div class="_3L5YSq" title="服务器安装（6）linux局域网搭建yum源"><a class="_1-HJSV _1OhGeD" href="https://www.jianshu.com/p/d30bc2cf93e6" target="_blank" rel="noopener noreferrer">服务器安装（6）linux局域网搭建yum源</a></div><div class="_19haGh">阅读 348</div></div><div class="cuOxAY" role="listitem"><div class="_3L5YSq" title="MySQL：Ubuntu下安装MySQL 8.0记录"><a class="_1-HJSV _1OhGeD" href="https://www.jianshu.com/p/d8032424369b" target="_blank" rel="noopener noreferrer">MySQL：Ubuntu下安装MySQL 8.0记录</a></div><div class="_19haGh">阅读 397</div></div><div class="cuOxAY" role="listitem"><div class="_3L5YSq" title="mysql5.7压缩版的安装"><a class="_1-HJSV _1OhGeD" href="https://www.jianshu.com/p/bc8797c48c05" target="_blank" rel="noopener noreferrer">mysql5.7压缩版的安装</a></div><div class="_19haGh">阅读 469</div></div><div class="cuOxAY" role="listitem"><div class="_3L5YSq" title="Linux直播服务器搭建"><a class="_1-HJSV _1OhGeD" href="https://www.jianshu.com/p/402d1a5a84e7" target="_blank" rel="noopener noreferrer">Linux直播服务器搭建</a></div><div class="_19haGh">阅读 224</div></div></section><section class="-umr26" aria-label="xingchen-ad"><div id="_xingchen_83pjqkiwe64"></div><script type="text/javascript" smua="d=p&amp;s=b&amp;u=u2823529&amp;w=260&amp;h=260" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/o.js" async="" defer="defer"></script><div><iframe scrolling="no" style="width: 260px; height: 260px; margin: 0px; padding: 0px; border: 0px none;" src="https://boardy.huanqiu.com/smu/j.html#u2823529p000000000(gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0)" width="260" height="260" frameborder="0"></iframe></div></section></div></div></aside></div></div><footer style="width:100%"><div class="_2xr8G8"><div class="_1Jdfvb"><div class="TDvCqd"><textarea class="W2TSX_" placeholder="写下你的评论..."></textarea></div><div class="-pXE92"><div class="_3nj4GN" role="button" tabindex="0" aria-label="添加评论"><i aria-label="ic-reply" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#ic-reply"></use></svg></i><span>评论<!-- -->2</span></div><div class="_3nj4GN" role="button" tabindex="0" aria-label="给文章点赞"><i aria-label="ic-like" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#ic-like"></use></svg></i><span>赞<!-- -->3</span></div><div class="_3nj4GN ant-dropdown-trigger" role="button" tabindex="0" aria-label="更多操作"><i aria-label="ic-others" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#ic-others"></use></svg></i></div></div></div></div><div class="_1LI0En" style="height: 56px;"></div></footer><div class="_27yofX _2gYj97"><div role="button" tabindex="-1" aria-label="抽奖关闭" class="_1bKQQB"></div><div class="TlIPNx" role="button" tabindex="0"><div class="_3eg6aX">抽奖</div><img class="_3ONY7G" src="" alt="reward"></div></div><div class="_3Pnjry"><div class="_1pUUKr"><div class="_2VdqdF" role="button" tabindex="-1" aria-label="给文章点赞"><i aria-label="ic-like" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#ic-like"></use></svg></i></div><div class="P63n6G"><div class="_2LKTFF"><span class="_1GPnWJ" role="button" tabindex="-1" aria-label="查看点赞列表">3<!-- -->赞</span><span class="_1GPnWJ">4<!-- -->赞</span></div></div></div><div class="_1pUUKr"><div class="_2VdqdF" role="button" tabindex="-1" aria-label="赞赏作者"><i aria-label="ic-shang" class="anticon"><svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><use xlink:href="#ic-shang"></use></svg></i></div><div class="P63n6G" role="button" tabindex="-1" aria-label="查看赞赏列表">赞赏</div></div><div class="_1pUUKr"><div class="_2VdqdF _1fDw5l"><span class="t-eN3x RhY_sp"></span></div><div class="P63n6G">更多好文</div></div></div></div><script async="" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/hm.js"></script><script async="" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/analytics.js"></script><script id="__NEXT_DATA__" type="application/json">{"dataManager":"[]","props":{"isServer":true,"initialState":{"global":{"done":false,"artFromType":null,"fontType":"black","$modal":{"ContributeModal":false,"RewardListModal":false,"PayModal":false,"CollectionModal":false,"LikeListModal":false,"ReportModal":false,"QRCodeShareModal":false,"BookCatalogModal":false,"RewardModal":false},"$ua":{"value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0","isIE11":false,"earlyIE":null,"chrome":null,"firefox":"91.0","safari":null,"isMac":false},"$diamondRate":{"displayable":false,"rate":0},"readMode":"day","locale":"zh-CN","seoList":[{"comments_count":5,"public_abbr":"1. Nginx的模块与工作原理 Nginx由内核和模块组成，其中，内核的设计非常微小和简洁，完成的工作也非常简单...","share_image_url":"http://upload-images.jianshu.io/upload_images/1910094-490e02bba0040ce7","slug":"d0b858ed5030","user":{"id":1910094,"nickname":"rosekissyou","slug":"ba8c3ff5a775","avatar":"https://upload.jianshu.io/users/upload_avatars/1910094/fd6cb25644ba.jpg"},"likes_count":125,"title":"Nginx与php工作原理","id":7756447,"views_count":8960},{"comments_count":0,"public_abbr":"重新系统学习下C++；但是还是少了好多知识点；socket；unix；stl；boost等； C++ 教程 | 菜...","share_image_url":"","slug":"9daf663b8c52","user":{"id":634959,"nickname":"kakukeme","slug":"3f0075454d65","avatar":"https://upload.jianshu.io/users/upload_avatars/634959/664ab8e4-2ede-470e-b3b9-cd5463b0260d.png"},"likes_count":52,"title":"C++ 教程 | 菜鸟教程","id":9917594,"views_count":14673},{"comments_count":0,"public_abbr":"更改ip和dnsVi  /etc/sysconfig/network-scripts/ifcfg-eth0vi /...","share_image_url":"","slug":"fcb9cb3f7db0","user":{"id":8907227,"nickname":"Xwei_","slug":"eaea1b5f3e42","avatar":"https://cdn2.jianshu.io/assets/default_avatar/7-0993d41a595d6ab6ef17b19496eb2f21.jpg"},"likes_count":3,"title":"nginx-php-mysql","id":19388854,"views_count":1055},{"comments_count":9,"public_abbr":"邮筒成为衣匠 将影子剪成风衣 裹住四季 可寒风 仍从四季之外 带斜雨 浇灌灰烬 〔8712〕","share_image_url":"http://upload-images.jianshu.io/upload_images/3351123-88e4c32c49239498.jpg","slug":"61576fd4e0c5","user":{"id":3351123,"nickname":"微风LG","slug":"156151b721fd","avatar":"https://upload.jianshu.io/users/upload_avatars/3351123/2d6d10db902c"},"likes_count":2,"title":"多余","id":6472650,"views_count":158},{"comments_count":0,"public_abbr":"相比较连续的春日暖阳，今天的气温真的算是低的。 可是在凉凉的春风中，却有两件事，让我真切感受到了“小确幸” 十一年...","share_image_url":"http://upload-images.jianshu.io/upload_images/5339455-cbd70d8134e89c4a.JPG","slug":"2f9c4a5465f2","user":{"id":5339455,"nickname":"心湖清清","slug":"b4ff39251aec","avatar":"https://cdn2.jianshu.io/assets/default_avatar/12-aeeea4bedf10f2a12c0d50d626951489.jpg"},"likes_count":0,"title":"那些春日里的小确幸--手机随拍","id":10488622,"views_count":116}]},"note":{"data":{"is_author":false,"last_updated_at":1512257206,"public_title":"gsoap使用笔记","purchased":false,"liked_note":false,"comments_count":2,"free_content":"\u003ch1\u003egsoap入门\u003c/h1\u003e\n\u003ch2\u003e1 使用gsoap搭建web service\u003c/h2\u003e\n\u003cp\u003e参考了参考文档[2]中的介绍，有一点点修改。\u003c/p\u003e\n\u003ch3\u003e1.1 编译calc客户端\u003c/h3\u003e\n\u003col\u003e\n\u003cli\u003e根据\u003ccode\u003ewsdl\u003c/code\u003e文件生成gsoap用的头文件\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode\u003ewsdl2h -o calc.h http://www.genivia.com/calc.wsdl\n\u003c/code\u003e\u003c/pre\u003e\n\u003col start=\"2\"\u003e\n\u003cli\u003e如果用我们自己搭建的webserver，需要修改头文件中的如下代码，\u003cbr\u003e\n把port字段修改为自己的webservice的url。\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode\u003e//gsoap ns2  service port:      http://websrv.cs.fsu.edu/~engelen/calcserver.cgi\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e改为\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e//gsoap ns2  service port:      http://localhost:9999/cgi-bin/calcserver.cgi\n\u003c/code\u003e\u003c/pre\u003e\n\u003col start=\"3\"\u003e\n\u003cli\u003e生成client proxy类的源代码\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode\u003esoapcpp2 -j -CL -I/usr/share/gsoap/import calc.h\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e\u003ccode\u003e-j\u003c/code\u003e生成C++ proxy类，供client调用，\u003ccode\u003e-CL\u003c/code\u003e生成客户端程序，\u003ccode\u003e-I\u003c/code\u003e指明gsoap相关头文件路径，这个根据gsoap安装位置而定，例子中的路径是ubuntu通过\u003ccode\u003eapt-get\u003c/code\u003e安装的gsoap的路径。\u003c/p\u003e\n\u003col start=\"4\"\u003e\n\u003cli\u003e编写client程序\u003ccode\u003ecalcclient.cpp\u003c/code\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode class=\"cpp\"\u003e#include \"calc.nsmap\"      // XML namespace mapping table (only needed once at the global level)\n#include \"soapcalcProxy.h\" // the proxy class, also #includes \"soapH.h\" and \"soapStub.h\"\nint main()\n{\n  calcProxy calc;\n  double sum;\n  if (calc.add(1.23, 4.56, sum) == SOAP_OK)\n    std::cout \u0026lt;\u0026lt; \"Sum = \" \u0026lt;\u0026lt; sum \u0026lt;\u0026lt; std::endl;\n  else\n    calc.soap_stream_fault(std::cerr);\n  calc.destroy(); // same as: soap_destroy(calc.soap);\n  soap_end(calc.soap);\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e调用proxy类\u003ccode\u003ecalcProxy\u003c/code\u003e 的 \u003ccode\u003eadd\u003c/code\u003e方法，传递了2个参数\u003ccode\u003e1.23\u003c/code\u003e \u003ccode\u003e4.56\u003c/code\u003e，打印结果。\u003c/p\u003e\n\u003col start=\"5\"\u003e\n\u003cli\u003e编译\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode\u003ec++ -o calcclient calcclient.cpp soapC.cpp soapcalcProxy.cpp -lgsoap++\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e如果第二步没修改port的话，这时候执行\u003ccode\u003ecalcclient\u003c/code\u003e就能得到结果了，如果修改了port，我们需要自己搭建一个webservice来提供calc服务。\u003c/p\u003e\n\u003ch3\u003e1.2 搭建服务器\u003c/h3\u003e\n\u003ch4\u003e1.2.1 编译服务器端程序\u003c/h4\u003e\n\u003col\u003e\n\u003cli\u003e与client第一步一样，生成\u003ccode\u003ecalc.h\u003c/code\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode\u003ewsdl2h -o calc.h http://www.genivia.com/calc.wsdl\n\u003c/code\u003e\u003c/pre\u003e\n\u003col start=\"2\"\u003e\n\u003cli\u003e生成server端的接口类\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode\u003esoapcpp2 -j -SL -I/usr/share/gsoap/import calc.h\n\u003c/code\u003e\u003c/pre\u003e\n\u003col start=\"3\"\u003e\n\u003cli\u003e编写cgi程序\u003ccode\u003ecalcserver.cpp\u003c/code\u003e，实现calc服务器端的接口\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode class=\"cpp\"\u003e#include \"calc.nsmap\"        // XML namespace mapping table (only needed once at the global level)\n#include \"soapcalcService.h\" // the service class, also #includes \"soapH.h\" and \"soapStub.h\"\nint main()\n{\n  calcService calc(SOAP_XML_INDENT);\n  if (calc.serve() != SOAP_OK)\n    calc.soap_stream_fault(std::cerr);\n  calc.destroy(); // same as: soap_destroy(calc.soap);\n  soap_end(calc.soap);\n}\nint calcService::add(double a, double b, double \u0026amp;result)\n{\n  result = a + b;\n  return SOAP_OK;\n}\nint calcService::sub(double a, double b, double \u0026amp;result)\n{\n  result = a - b;\n  return SOAP_OK;\n}\nint calcService::mul(double a, double b, double \u0026amp;result)\n{\n  result = a * b;\n  return SOAP_OK;\n}\nint calcService::div(double a, double b, double \u0026amp;result)\n{\n  if (b == 0.0)\n  {\n    char *msg = (char*)soap_malloc(this-\u0026gt;soap, 1024);\n    snprintf(msg, 1024, \"Trying to divide %f by zero\", a);\n    return this-\u0026gt;soap_senderfault(msg, NULL);\n  }\n  result = a / b;\n  return SOAP_OK;\n}\nint calcService::pow(double a, double b, double \u0026amp;result)\n{\n  result = ::pow(a, b);\n  // soap_errno is like errno, but compatible with Win32\n  if (soap_errno == EDOM)\n  {\n    char *msg = (char*)soap_malloc(this-\u0026gt;soap, 1024);\n    snprintf(msg, 1024, \"\u0026lt;error xmlns=\\\"http://tempuri.org/\\\"\u0026gt;Can't take power of %f to %f\u0026lt;/error\u0026gt;\", a, b);\n    return this-\u0026gt;soap_senderfault(\"Power function domain error\", msg);\n  }\n  return SOAP_OK;\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003col start=\"4\"\u003e\n\u003cli\u003e编译，测试\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode\u003ec++ -o calcserver calcserver.cpp soapC.cpp soapcalcService.cpp -lgsoap++\n./calcserver \u0026lt; calc.add.req.xml\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e这时候\u003ccode\u003ecalcserver\u003c/code\u003e是一个cgi程序，从标准输入读取soap命令，输出到标准输出上。接下来搭建一个webserver来提供cgi服务。\u003c/p\u003e\n\u003ch4\u003e1.2.2 搭建cgi服务器\u003c/h4\u003e\n\u003cp\u003e简单起见，使用docker启动一个apache来作为web server。\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e下载apache镜像\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode\u003edocker pull httpd:2.4\n\u003c/code\u003e\u003c/pre\u003e\n\u003col start=\"2\"\u003e\n\u003cli\u003e修改\u003ccode\u003ehttp.conf\u003c/code\u003e文件，启动apache对cgi的支持。\u003cbr\u003e\n取得http.conf文件，修改其中的cgi支持，打开下面内容的注释即可\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode\u003eLoadModule cgi_module modules/mod_cgi.so\n\u003c/code\u003e\u003c/pre\u003e\n\u003cul\u003e\n\u003cli\u003ehttp.conf在docker container的路径为：\u003ccode\u003e/usr/local/apache2/conf/httpd.conf\u003c/code\u003e\n\u003c/li\u003e\n\u003cli\u003e这步不做的话，运行client的时候，会提示如下错误，即apache把cgi请求当成了下载文件的请求。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre\u003e\u003ccode\u003eError 200 fault: SOAP-ENV:Client[no subcode]\n\"Error 200\"\nDetail: [no detail]\n\u003c/code\u003e\u003c/pre\u003e\n\u003col start=\"3\"\u003e\n\u003cli\u003e启动服务,在\u003ccode\u003ecalcserver\u003c/code\u003e和\u003ccode\u003ehttp.conf\u003c/code\u003e所在目录输入如下命令:\u003c/li\u003e\n\u003c/ol\u003e\n\u003cpre\u003e\u003ccode\u003edocker run -it --rm --name my-apache-app -p 9999:80 -v \"$PWD\":/usr/local/apache2/cgi-bin -v \"$PWD\"/http.conf:/usr/local/apache2/conf/httpd.conf -v /usr/lib/x86_64-linux-gnu/libgsoap++.so.4:/usr/lib/x86_64-linux-gnu/libgsoap++.so.4 httpd:2.4\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch3\u003e1.3 其他\u003c/h3\u003e\n\u003ch4\u003e1.3.1 问题\u003c/h4\u003e\n\u003cp\u003egsoap也支持自己作为web服务器提供服务，只需要修改server代码，即可，但我没有试验成功。\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eint main()\n{\n  calcService calc(SOAP_XML_INDENT);\n  //if (calc.serve() != SOAP_OK) \u0026lt;--这里改为调用run\n  if (calc.run(9999) != SOAP_OK)\n    calc.soap_stream_fault(std::cerr);\n  calc.destroy(); // same as: soap_destroy(calc.soap);\n  soap_end(calc.soap);\n}\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e这时运行服务器程序时始终提示：\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esetsockopt unset IPV6_V6ONLY failed in soap_bind()\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch4\u003e1.3.2 curl调试webservice服务器\u003c/h4\u003e\n\u003cp\u003e可以使用\u003ccode\u003ecurl\u003c/code\u003e模拟客户端请求一个soap服务[4]，命令如下：\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003ecurl -v --header \"content-type: application/soap+xml\"  --data @calc.add.req.xml localhost:9999/cgi-bin/calcserver.cgi\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2\u003e2 编译arm-linux版本的gsoap\u003c/h2\u003e\n\u003ch3\u003e2.1 下载gsoap源码\u003c/h3\u003e\n\u003cp\u003e\u003ca href=\"https://link.jianshu.com?t=http://liquidtelecom.dl.sourceforge.net/project/gsoap2/gSOAP/gsoap_2.8.33.zip\" target=\"_blank\" rel=\"nofollow\"\u003ehttp://liquidtelecom.dl.sourceforge.net/project/gsoap2/gSOAP/gsoap_2.8.33.zip\u003c/a\u003e\u003c/p\u003e\n\u003ch3\u003e2.2 配置编译环境\u003c/h3\u003e\n\u003col\u003e\n\u003cli\u003e下载linaro toolchain，解压到目录\u003ccode\u003e/usr/local/linaro-multilib-2014.06-gcc4.9\u003c/code\u003e\n\u003c/li\u003e\n\u003cli\u003e设置\u003ccode\u003ePATH\u003c/code\u003e环境变量。\u003ccode\u003eexport PATH=/usr/local/linaro-multilib-2014.06-gcc4.9:$PATH\u003c/code\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch3\u003e2.3 config\u0026amp;make\u003c/h3\u003e\n\u003ch4\u003e2.3.1 生成makefile\u003c/h4\u003e\n\u003cpre\u003e\u003ccode class=\"bash\"\u003egsoap-2.8$ ./configure --host=arm-linux-gnueabihf --prefix=/usr/local/arm-linux\nchecking for a BSD-compatible install... /usr/bin/install -c\nchecking whether build environment is sane... yes\nchecking for arm-linux-gnueabihf-strip... arm-linux-gnueabihf-strip\nchecking for a thread-safe mkdir -p... /bin/mkdir -p\nchecking for gawk... gawk\nchecking whether make sets $(MAKE)... yes\nchecking whether make supports nested variables... yes\nchecking build system type... x86_64-unknown-linux-gnu\nchecking host system type... arm-unknown-linux-gnueabihf\nchecking whether make sets $(MAKE)... (cached) yes\nchecking for arm-linux-gnueabihf-g++... arm-linux-gnueabihf-g++\nchecking whether the C++ compiler works... yes\nchecking for C++ compiler default output file name... a.out\nchecking for suffix of executables... \nchecking whether we are cross compiling... yes\n...\n\u003c/code\u003e\u003c/pre\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ccode\u003e--host=arm-linux-gnueabihf\u003c/code\u003e - 表明编译的库是运行在\u003ccode\u003earm linux\u003c/code\u003e上，这个也是gcc编译器的前缀。\u003c/li\u003e\n\u003cli\u003e\n\u003ccode\u003e--prefix=/usr/local/arm-linux\u003c/code\u003e - 表明变编译好的库的安装路径\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch4\u003e2.3.2 手动生成wsdl.h文件\u003c/h4\u003e\n\u003cpre\u003e\u003ccode class=\"bash\"\u003egsoap-2.8$ cd gsoap/wsdl\ngsoap-2.8/gsoap/wsdl$ ../../target-amd64/bin/soapcpp2 -SC -pwsdl -I. -I../../gsoap/import ./wsdl.h\n\n**  The gSOAP code generator for C and C++, soapcpp2 release 2.8.33\n**  Copyright (C) 2000-2016, Robert van Engelen, Genivia Inc.\n**  All Rights Reserved. This product is provided \"as is\", without any warranty.\n**  The soapcpp2 tool and its generated software are released under the GPL.\n**  ----------------------------------------------------------------------------\n**  A commercial use license is available from Genivia Inc., contact@genivia.com\n**  ----------------------------------------------------------------------------\n\nsoapcpp2: using both options -C and -S omits client/server code\nSaving wsdlStub.h annotated copy of the source interface file\nSaving wsdlH.h serialization functions to #include in projects\nSaving xmime.nsmap namespace mapping table\nSaving wsdlC.cpp serialization functions\n\nCompilation successful \n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e\u003cstrong\u003e\u003ccode\u003e../../target-amd64/bin/soapcpp2\u003c/code\u003e这个是你的host机器可以运行的soapcpp2\u003c/strong\u003e\u003cbr\u003e\u003cbr\u003e\n如果不做这步，在编译过程中会提示如下错误，因为编译时，生成的soapcpp2是只能在arm linux上运行的。\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003emake[4]: Entering directory `/home/meng/git/gsoap-2.8/gsoap/wsdl'\n../../gsoap/src/soapcpp2 -SC -pwsdl -I. -I../../gsoap/import ./wsdl.h\n/bin/bash: ../../gsoap/src/soapcpp2: cannot execute binary file: Exec format error\nmake[4]: *** [wsdlC.cpp] Error 126\n\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch4\u003e2.3.3 修改代码\u003c/h4\u003e\n\u003cp\u003e修改\u003ccode\u003econfig.h\u003c/code\u003e文件，删除最后一行的\u003ccode\u003e#define malloc rpl_malloc\u003c/code\u003e\u003cbr\u003e\n否则编译会出错\u003cbr\u003e\n`\u003c/p\u003e\n\u003ch4\u003e2.3.4 修改makefile\u003c/h4\u003e\n\u003cp\u003e修改\u003ccode\u003egsoap/wsdl\u003c/code\u003e目录下的\u003ccode\u003eMakefile\u003c/code\u003e，删除下面2行（因为wsdl2h对其他库有依赖，并且我们也不需要arm版本的wsdl2h程序）：\u003c/p\u003e\n\u003cpre\u003e\u003ccode class=\"makefile\"\u003ewsdl2h$(EXEEXT): $(wsdl2h_OBJECTS) $(wsdl2h_DEPENDENCIES) $(EXTRA_wsdl2h_DEPENDENCIES) \n    #@rm -f wsdl2h$(EXEEXT)\n    #$(AM_V_CXXLD)$(wsdl2h_LINK) $(wsdl2h_OBJECTS) $(wsdl2h_LDADD) $(LIBS)\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch4\u003e2.3.5 编译，安装\u003c/h4\u003e\n\u003cpre\u003e\u003ccode class=\"bash\"\u003egsoap-2.8$ make\ngsoap-2.8$ make install\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003e在目录\u003ccode\u003e/usr/local/arm-linux\u003c/code\u003e下是编译好的gsoap库，注：我们没有编译出来arm linux版本的\u003ccode\u003ewadl2h\u003c/code\u003e。\u003c/p\u003e\n\u003ch3\u003e2.4 编译arm-linux版calcserver.cgi\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e编译cgi版本的calcserver.cgi\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre\u003e\u003ccode class=\"bash\"\u003ecalcserver$ arm-linux-gnueabihf-g++ -o calcserver.cgi calcserver.cpp soapC.cpp soapcalcService.cpp -lgsoap++ -DWITH_FASTCGI -L/usr/local/arm-linux/lib -I/usr/local/arm-linux/include\n\u003c/code\u003e\u003c/pre\u003e\n\u003cul\u003e\n\u003cli\u003e编译支持fastcgi版本的calcserver.cgi[5]\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre\u003e\u003ccode class=\"bash\"\u003ecalcserver$ arm-linux-gnueabihf-g++ -o calcserver.cgi calcserver.cpp soapC.cpp soapcalcService.cpp /gsoap-source-path/gsoap/stdsoap2.cpp -DWITH_FASTCGI  -I/usr/local/arm-linux/include -I/fcgi-lib-path/fcgi/include -L/fcgi-lib-path/fcgi/usr/lib -lfcgi\n\u003c/code\u003e\u003c/pre\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ccode\u003efcgi-lib-path\u003c/code\u003e - 这个指向arm linux版的fcgi库\u003c/li\u003e\n\u003cli\u003e\n\u003ccode\u003egsoap-source-path\u003c/code\u003e - 这个指向gsoap的源码路径`\u003c/li\u003e\n\u003cli\u003e我们编译\u003ccode\u003estdsoap2.cpp\u003c/code\u003e这个文件，而不去链接\u003ccode\u003elibsoap++.a\u003c/code\u003e\n\u003c/li\u003e\n\u003cli\u003e定义\u003ccode\u003eWITH_FASTCGI\u003c/code\u003e宏\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3\u003e2.5 配置lighttpd\u003c/h3\u003e\n\u003cp\u003e如果编译的是cgi版本，直接把编译好的calcserver.cgi放到\u003ccode\u003ecig-bin\u003c/code\u003e目录下即可。\u003cbr\u003e\u003cbr\u003e\n如果是fastcgi版本，需要修改lighttpd配置文件，增加如下内容（前提lighttpd已经配置好支持fastcgi了）：\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003efastcgi.server = (\n  \"calcserver.cgi\" =\u0026gt;\n  (( \"socket\" =\u0026gt; \"/tmp/fcgi.socket\",\n     \"check-local\" =\u0026gt; \"disable\",\n     \"bin-path\" =\u0026gt; \"/webSvr/web/cgi-bin/calcserver.cgi\",\n     \"max-procs\" =\u0026gt; 1,\n  ))\n)\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2\u003e3 参考文档\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003e\u003ca href=\"https://link.jianshu.com?t=http://httpd.apache.org/docs/current/howto/cgi.html\" target=\"_blank\" rel=\"nofollow\"\u003eApache Tutorial: Dynamic Content with CGI\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://link.jianshu.com?t=http://www.genivia.com/dev.html\" target=\"_blank\" rel=\"nofollow\"\u003eGetting Started with gSOAP\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://link.jianshu.com?t=http://stackoverflow.com/questions/26002589/gsoap-missing-stdsoap2-cpp-undefined-reference-to-soap-peek-element\" target=\"_blank\" rel=\"nofollow\"\u003egSoap missing stdsoap2.cpp, undefined reference to `soap_peek_element'\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://link.jianshu.com?t=http://www.programgo.com/article/51462984174/\" target=\"_blank\" rel=\"nofollow\"\u003eCurl实现web serivce调试调用\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://link.jianshu.com?t=http://www.genivia.com/doc/soapdoc2.html#tth_sEc19.32\" target=\"_blank\" rel=\"nofollow\"\u003e19.32  FastCGI Support - genivia.com\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://link.jianshu.com?t=http://blog.csdn.net/u012084827/article/details/12202133\" target=\"_blank\" rel=\"nofollow\"\u003elinux设备上的Onvif 实现4：成功编译gsoap 2.8.15 - blog.csdn\u003c/a\u003e\u003c/li\u003e\n\u003c/ol\u003e\n","voted_down":false,"rewardable":true,"show_paid_comment_tips":false,"share_image_url":"https://cdn2.jianshu.io/assets/default_avatar/2-9636b13945b9ccf345bc98d0d81074eb.jpg","slug":"33da835ba0f2","user":{"liked_by_user":false,"following_count":18,"gender":0,"avatar_widget":null,"slug":"eb6f438347b8","intro":"","likes_count":54,"nickname":"menglj","badges":[],"total_fp_amount":"1662238008713242575","wordage":12245,"avatar":"https://cdn2.jianshu.io/assets/default_avatar/2-9636b13945b9ccf345bc98d0d81074eb.jpg","id":111810,"liked_user":false},"likes_count":3,"paid_type":"free","show_ads":true,"paid_content_accessible":false,"hide_search_input":false,"total_fp_amount":"0","trial_open":false,"reprintable":true,"bookmarked":false,"wordage":1142,"featured_comments_count":0,"downvotes_count":0,"wangxin_trial_open":null,"guideShow":{"audit_user_nickname_spliter":0,"pc_note_bottom_btn":1,"pc_like_author_guidance":1,"ban_some_labels":1,"h5_real_name_auth_link":1,"audit_user_background_image_spliter":0,"audit_note_spliter":0,"new_user_no_ads":1,"launch_tab":1,"include_post":0,"pc_login_guidance":1,"audit_comment_spliter":0,"pc_note_bottom_qrcode":1,"audit_user_avatar_spliter":0,"audit_collection_spliter":0,"pc_top_lottery_guidance":1,"subscription_guide_entry":1,"creation_muti_function_on":1,"explore_score_searcher":1,"audit_user_spliter":0,"h5_ab_test":1,"reason_text":1,"pc_note_popup":2},"commentable":true,"total_rewards_count":0,"id":4604939,"notebook":{"name":""},"activity_collection_slug":null,"description":"gsoap入门 1 使用gsoap搭建web service 参考了参考文档[2]中的介绍，有一点点修改。 1.1 编译calc客户端 根据wsdl文件生成gsoap用的头文...","first_shared_at":1467265539,"views_count":6533,"notebook_id":229611},"baseList":{"likeList":[],"rewardList":[]},"status":"success","statusCode":0},"user":{"isLogin":false,"userInfo":{}},"comments":{"list":[],"featuredList":[]}},"initialProps":{"pageProps":{"query":{"slug":"33da835ba0f2"}},"localeData":{"common":{"jianshu":"简书","diamond":"简书钻","totalAssets":"总资产{num}","diamondValue":" (约{num}元)","login":"登录","logout":"注销","register":"注册","on":"开","off":"关","follow":"关注","followBook":"关注连载","following":"已关注","cancelFollow":"取消关注","publish":"发布","wordage":"字数","audio":"音频","read":"阅读","reward":"赞赏","zan":"赞","comment":"评论","expand":"展开","prevPage":"上一页","nextPage":"下一页","floor":"楼","confirm":"确定","delete":"删除","report":"举报","fontSong":"宋体","fontBlack":"黑体","chs":"简体","cht":"繁体","jianChat":"简信","postRequest":"投稿请求","likeAndZan":"喜欢和赞","rewardAndPay":"赞赏和付费","home":"我的主页","markedNotes":"收藏的文章","likedNotes":"喜欢的文章","paidThings":"已购内容","wallet":"我的钱包","setting":"设置","feedback":"帮助与反馈","loading":"加载中...","needLogin":"请登录后进行操作","trialing":"文章正在审核中...","reprintTip":"禁止转载，如需转载请通过简信或评论联系作者。"},"error":{"rewardSelf":"无法打赏自己的文章哟~"},"message":{"paidNoteTip":"付费购买后才可以参与评论哦","CommentDisableTip":"作者关闭了评论功能","contentCanNotEmptyTip":"回复内容不能为空","addComment":"评论发布成功","deleteComment":"评论删除成功","likeComment":"评论点赞成功","setReadMode":"阅读模式设置成功","setFontType":"字体设置成功","setLocale":"显示语言设置成功","follow":"关注成功","cancelFollow":"取消关注成功","copySuccess":"复制代码成功"},"header":{"homePage":"首页","download":"下载APP","discover":"发现","message":"消息","reward":"赞赏支持","editNote":"编辑文章","writeNote":"写文章","techarea":"IT技术"},"note":{},"noteMeta":{"lastModified":"最后编辑于 ","wordage":"字数 {num}","viewsCount":"阅读 {num}"},"divider":{"selfText":"以下内容为付费内容，定价 ¥{price}","paidText":"已付费，可查看以下内容","notPaidText":"还有 {percent} 的精彩内容","modify":"点击修改"},"paidPanel":{"buyNote":"支付 ¥{price} 继续阅读","buyBook":"立即拿下 ¥{price}","freeTitle":"该作品为付费连载","freeText":"购买即可永久获取连载内的所有内容，包括将来更新的内容","paidTitle":"还没看够？拿下整部连载！","paidText":"永久获得连载内的所有内容, 包括将来更新的内容"},"book":{"last":"已是最后","lookCatalog":"查看连载目录","header":"文章来自以下连载"},"action":{"like":"{num}人点赞","collection":"收入专题","report":"举报文章"},"comment":{"allComments":"全部评论","featuredComments":"精彩评论","closed":"评论已关闭","close":"关闭评论","open":"打开评论","desc":"按时间倒序","asc":"按时间正序","disableText1":"用户已关闭评论，","disableText2":"与Ta简信交流","placeholder":"写下你的评论...","publish":"发表","create":" 添加新评论","reply":" 回复","restComments":"还有{num}条评论，","expandImage":"展开剩余{num}张图","deleteText":"确定要删除评论么？"},"collection":{"title":"被以下专题收入，发现更多相似内容","putToMyCollection":"收入我的专题"},"seoList":{"title":"推荐阅读","more":"更多精彩内容"},"sideList":{"title":"推荐阅读"},"wxShareModal":{"desc":"打开微信“扫一扫”，打开网页后点击屏幕右上角分享按钮"},"bookChapterModal":{"try":"试读","toggle":"切换顺序"},"collectionModal":{"title":"收入到我管理的专题","search":"搜索我管理的专题","newCollection":"新建专题","create":"创建","nothingFound":"未找到相关专题","loadMore":"展开查看更多"},"contributeModal":{"search":"搜索专题投稿","newCollection":"新建专题","addNewOne":"去新建一个","nothingFound":"未找到相关专题","loadMore":"展开查看更多","managed":"我管理的专题","recommend":"推荐专题"},"QRCodeShow":{"payTitle":"微信扫码支付","payText":"支付金额"},"rewardModal":{"title":"给作者送糖","custom":"自定义","placeholder":"给Ta留言...","choose":"选择支付方式","balance":"简书余额","tooltip":"网站该功能暂时下线，如需使用，请到简书App操作","confirm":"确认支付","success":"赞赏成功"},"payModal":{"payBook":"购买连载","payNote":"购买文章","promotion":"优惠券","promotionFetching":"优惠券获取中...","noPromotion":"无可用优惠券","promotionNum":"{num}张可用","noUsePromotion":"不使用优惠券","validPromotion":"可用优惠券","invalidPromotion":"不可用优惠券","total":"支付总额","tip1":"· 你将购买的商品为虚拟内容服务，购买后不支持退订、转让、退换，请斟酌确认。","tip2":"· 购买后可在“已购内容”中查看和使用。","success":"购买成功"},"reportModal":{"abuse":"辱骂、人身攻击等不友善内容","minors_forbidden":"未成年违规内容","ad":"广告及垃圾信息","plagiarism":"抄袭或未授权转载","placeholder":"写下举报的详情情况（选填）","success":"举报成功"},"guidModal":{"modalAText":"相似文章推荐","subText":"下载简书APP，浏览更多相似文章","btnAText":"先不下载，下次再说","followOkText":"关注作者成功！","followTextTip":"下载简书APP，作者更多精彩内容更新及时提醒！","followBtn":"下次再说","downloadTipText":"更多精彩内容，就在简书APP","footerDownLoadText":"下载简书APP","modabTitle":"免费送你2次抽奖机会","modalbTip":"抽取10000收益加成卡，下载简书APP概率翻倍","modalbFooterTip":"下载简书APP，天天参与抽大奖","modalReward":"抽奖","scanQrtip":"扫码下载简书APP","downloadAppText":"下载简书APP，随时随地发现和创作内容","redText":"阅读","likesText":"赞","downLoadLeft":"更多好文","leftscanText":"把文字装进口袋"}},"currentLocale":"zh-CN","asPath":"/p/33da835ba0f2"}},"page":"/p/[slug]","query":{"slug":"33da835ba0f2"},"buildId":"q4ZECStUK1WhJkfihtktr","assetPrefix":"https://cdn2.jianshu.io/shakespeare"}</script><script nomodule="" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/polyfills-83c9f0eea3aa0edfd89e.js"></script><script async="" data-next-page="/p/[slug]" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/slug.js"></script><script async="" data-next-page="/_app" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/_app.js"></script><script src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/webpack-b970243236ece2cb2fcf.js" async=""></script><script src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/commons.js" async=""></script><script src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/styles.js" async=""></script><div id="BAIDU_DUP_fp_wrapper" style="position: absolute; left: -1px; bottom: -1px; z-index: 0; width: 0px; height: 0px; overflow: hidden; visibility: hidden; display: none;"><iframe id="BAIDU_DUP_fp_iframe" src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/o.html" style="width: 0px; height: 0px; visibility: hidden; display: none;"></iframe></div><script src="gsoap%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0%20-%20%E7%AE%80%E4%B9%A6_files/main-aaafd02c978b8de8e326.js" async=""></script></body></html>